feat: scan graph
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 37s
CI / bff (push) Successful in 18s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 1s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 22s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 21s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / aiserver (push) Successful in 0s
CI / analysis (push) Successful in 37s
CI / bff (push) Successful in 18s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 1s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 0s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 22s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 21s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
This commit is contained in:
@@ -40,10 +40,14 @@ func (l *InternalUpdateLogic) InternalUpdate(in *user.InternalUpdateReq) (*user.
|
||||
return nil, status.Error(codes.InvalidArgument, msg)
|
||||
}
|
||||
|
||||
userId, findErr := findUserIdByBiz(l.svcCtx.DB, req.BizId, req.SubjectType)
|
||||
if findErr != nil {
|
||||
l.Errorf("internal update find by biz: %v", findErr)
|
||||
return nil, status.Error(codes.Internal, utils.Fail.Msg)
|
||||
userId := req.UserId
|
||||
if userId < utils.NumberOne {
|
||||
var findErr error
|
||||
userId, findErr = findUserIdByBiz(l.svcCtx.DB, req.BizId, req.SubjectType)
|
||||
if findErr != nil {
|
||||
l.Errorf("internal update find by biz: %v", findErr)
|
||||
return nil, status.Error(codes.Internal, utils.Fail.Msg)
|
||||
}
|
||||
}
|
||||
if userId < utils.NumberOne {
|
||||
return nil, status.Error(codes.NotFound, utils.ErrorNotFund.Msg)
|
||||
|
||||
@@ -38,11 +38,6 @@ func (l *InternalUsersByBizLogic) InternalUsersByBiz(in *user.InternalUsersByBiz
|
||||
return nil, status.Error(codes.InvalidArgument, msg)
|
||||
}
|
||||
|
||||
hasFilter := req.Keyword != utils.StringEmpty || req.Gender > utils.NumberZero || req.BirthdayGte != utils.StringEmpty || req.BirthdayLte != utils.StringEmpty
|
||||
if len(req.BizIds) == utils.NumberZero && !hasFilter {
|
||||
return nil, status.Error(codes.InvalidArgument, "请指定用户或筛选条件")
|
||||
}
|
||||
|
||||
bizIds := make([]string, 0, len(req.BizIds))
|
||||
seenBiz := make(map[int64]struct{}, len(req.BizIds))
|
||||
for _, id := range req.BizIds {
|
||||
|
||||
@@ -325,6 +325,7 @@ type InternalUpdateValidator struct {
|
||||
Secret string `validate:"omitempty,max=255"`
|
||||
BizId int64 `validate:"required,gt=0"`
|
||||
SubjectType string `validate:"required,oneof=sale store user"`
|
||||
UserId int64 `validate:"omitempty,gte=0"`
|
||||
}
|
||||
|
||||
type InternalVerifyPasswordValidator struct {
|
||||
|
||||
Reference in New Issue
Block a user