feat: face login test account
CI / changes (push) Has been cancelled
CI / ad (push) Has been cancelled
CI / admin (push) Has been cancelled
CI / aiserver (push) Has been cancelled
CI / analysis (push) Has been cancelled
CI / bff (push) Has been cancelled
CI / chore (push) Has been cancelled
CI / equipment (push) Has been cancelled
CI / express (push) Has been cancelled
CI / factory (push) Has been cancelled
CI / message (push) Has been cancelled
CI / order (push) Has been cancelled
CI / payment (push) Has been cancelled
CI / percutaneous (push) Has been cancelled
CI / product (push) Has been cancelled
CI / record (push) Has been cancelled
CI / sale (push) Has been cancelled
CI / store (push) Has been cancelled
CI / support (push) Has been cancelled
CI / task (push) Has been cancelled
CI / user (push) Has been cancelled
CI / water (push) Has been cancelled
CI / wecom (push) Has been cancelled
CI / ws (push) Has been cancelled
CI / changes (push) Has been cancelled
CI / ad (push) Has been cancelled
CI / admin (push) Has been cancelled
CI / aiserver (push) Has been cancelled
CI / analysis (push) Has been cancelled
CI / bff (push) Has been cancelled
CI / chore (push) Has been cancelled
CI / equipment (push) Has been cancelled
CI / express (push) Has been cancelled
CI / factory (push) Has been cancelled
CI / message (push) Has been cancelled
CI / order (push) Has been cancelled
CI / payment (push) Has been cancelled
CI / percutaneous (push) Has been cancelled
CI / product (push) Has been cancelled
CI / record (push) Has been cancelled
CI / sale (push) Has been cancelled
CI / store (push) Has been cancelled
CI / support (push) Has been cancelled
CI / task (push) Has been cancelled
CI / user (push) Has been cancelled
CI / water (push) Has been cancelled
CI / wecom (push) Has been cancelled
CI / ws (push) Has been cancelled
This commit is contained in:
@@ -64,9 +64,12 @@ func (l *FaceLoginLogic) FaceLogin(in *analysis.FaceLoginReq) (*analysis.Respons
|
|||||||
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 || userID < utils.NumberOne {
|
if err != nil || userID < utils.NumberOne {
|
||||||
|
|
||||||
|
l.Infof("XXXXXX", utils.GetConfigString("base.mode"))
|
||||||
if utils.GetConfigString("base.mode") == "dev" {
|
if utils.GetConfigString("base.mode") == "dev" {
|
||||||
userID = 1
|
userID = 1
|
||||||
} else {
|
} else {
|
||||||
|
l.Infof("AAAAAAAAAA")
|
||||||
return common.FailResponse(utils.ErrorFaceNotMatch), nil
|
return common.FailResponse(utils.ErrorFaceNotMatch), nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,22 +61,26 @@ func (p LoginValidator) GetMessage() validate.ValidatorMessages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type UpdateValidator struct {
|
type UpdateValidator struct {
|
||||||
Name string `validate:"omitempty,max=64"`
|
Name string `validate:"required,max=64"`
|
||||||
Avatar string `validate:"omitempty,max=512"`
|
Avatar string `validate:"required,max=512"`
|
||||||
Gender uint32 `validate:"omitempty,oneof=0 1 2 3"`
|
Gender uint32 `validate:"required,oneof=1 2 3"`
|
||||||
Birthday string `validate:"omitempty,max=32"`
|
Birthday string `validate:"required,max=32"`
|
||||||
Mobile string `validate:"omitempty,len=11"`
|
Mobile string `validate:"omitempty,len=11"`
|
||||||
RealName string `validate:"omitempty,max=64"`
|
RealName string `validate:"omitempty,max=64"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p UpdateValidator) GetMessage() validate.ValidatorMessages {
|
func (p UpdateValidator) GetMessage() validate.ValidatorMessages {
|
||||||
return validate.ValidatorMessages{
|
return validate.ValidatorMessages{
|
||||||
"Name.max": "昵称过长",
|
"Name.required": "昵称不能为空",
|
||||||
"Avatar.max": "头像地址过长",
|
"Name.max": "昵称过长",
|
||||||
"Gender.oneof": "性别不正确",
|
"Avatar.required": "头像不能为空",
|
||||||
"Birthday.max": "生日过长",
|
"Avatar.max": "头像地址过长",
|
||||||
"Mobile.len": "手机号格式不正确",
|
"Gender.required": "性别不能为空",
|
||||||
"RealName.max": "真实姓名过长",
|
"Gender.oneof": "性别不正确",
|
||||||
|
"Birthday.required": "生日不能为空",
|
||||||
|
"Birthday.max": "生日过长",
|
||||||
|
"Mobile.len": "手机号格式不正确",
|
||||||
|
"RealName.max": "真实姓名过长",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user