feat: face login test account
CI / changes (push) Successful in 1m33s
CI / ad (push) Successful in 37s
CI / admin (push) Successful in 32s
CI / aiserver (push) Successful in 32s
CI / analysis (push) Successful in 42s
CI / bff (push) Successful in 27s
CI / chore (push) Successful in 35s
CI / equipment (push) Successful in 39s
CI / express (push) Successful in 37s
CI / factory (push) Successful in 35s
CI / message (push) Successful in 34s
CI / order (push) Successful in 34s
CI / payment (push) Successful in 32s
CI / percutaneous (push) Successful in 33s
CI / product (push) Successful in 35s
CI / record (push) Successful in 35s
CI / sale (push) Successful in 37s
CI / store (push) Successful in 37s
CI / support (push) Successful in 34s
CI / task (push) Successful in 38s
CI / user (push) Successful in 35s
CI / water (push) Successful in 35s
CI / wecom (push) Successful in 37s
CI / ws (push) Successful in 12s
CI / changes (push) Successful in 1m33s
CI / ad (push) Successful in 37s
CI / admin (push) Successful in 32s
CI / aiserver (push) Successful in 32s
CI / analysis (push) Successful in 42s
CI / bff (push) Successful in 27s
CI / chore (push) Successful in 35s
CI / equipment (push) Successful in 39s
CI / express (push) Successful in 37s
CI / factory (push) Successful in 35s
CI / message (push) Successful in 34s
CI / order (push) Successful in 34s
CI / payment (push) Successful in 32s
CI / percutaneous (push) Successful in 33s
CI / product (push) Successful in 35s
CI / record (push) Successful in 35s
CI / sale (push) Successful in 37s
CI / store (push) Successful in 37s
CI / support (push) Successful in 34s
CI / task (push) Successful in 38s
CI / user (push) Successful in 35s
CI / water (push) Successful in 35s
CI / wecom (push) Successful in 37s
CI / ws (push) Successful in 12s
This commit is contained in:
@@ -75,8 +75,8 @@ type Params struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type PageResult struct {
|
type PageResult struct {
|
||||||
Count int64
|
Count int64 `json:"count"`
|
||||||
Items interface{}
|
Items interface{} `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base is embedded by per-table models in each service.
|
// Base is embedded by per-table models in each service.
|
||||||
|
|||||||
@@ -62,9 +62,14 @@ func (l *FaceLoginLogic) FaceLogin(in *analysis.FaceLoginReq) (*analysis.Respons
|
|||||||
|
|
||||||
userID, score, err := face.SearchUser(vector)
|
userID, score, err := face.SearchUser(vector)
|
||||||
l.Infof("face login user_id=%d score=%v err=%v", userID, score, err)
|
l.Infof("face login user_id=%d score=%v err=%v", userID, score, err)
|
||||||
if err != nil {
|
|
||||||
|
if err != nil || userID < utils.NumberOne {
|
||||||
|
if utils.GetConfigString("base.mode") == "dev" {
|
||||||
|
userID = 1
|
||||||
|
} else {
|
||||||
return common.FailResponse(utils.ErrorFaceNotMatch), nil
|
return common.FailResponse(utils.ErrorFaceNotMatch), nil
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if l.svcCtx.UserSvcName == utils.StringEmpty {
|
if l.svcCtx.UserSvcName == utils.StringEmpty {
|
||||||
return common.FailResponse(utils.Fail), nil
|
return common.FailResponse(utils.Fail), nil
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ func (p AgreementInfoValidator) GetMessage() validate.ValidatorMessages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type UserDeleteValidator struct {
|
type UserDeleteValidator struct {
|
||||||
Id int64 `validate:"required,gt=0"` // 平台 users.id
|
Id int64 `validate:"required,gt=0"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p UserDeleteValidator) GetMessage() validate.ValidatorMessages {
|
func (p UserDeleteValidator) GetMessage() validate.ValidatorMessages {
|
||||||
|
|||||||
Reference in New Issue
Block a user