feat: analysis user improve
CI / changes (push) Successful in 1m33s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 1s
CI / analysis (push) Successful in 32s
CI / bff (push) Successful in 17s
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 1s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 1s
CI / record (push) Successful in 0s
CI / product (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / task (push) Successful in 0s
CI / support (push) Successful in 1s
CI / user (push) Successful in 1s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
CI / changes (push) Successful in 1m33s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 1s
CI / analysis (push) Successful in 32s
CI / bff (push) Successful in 17s
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 1s
CI / payment (push) Successful in 0s
CI / percutaneous (push) Successful in 1s
CI / record (push) Successful in 0s
CI / product (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / store (push) Successful in 0s
CI / task (push) Successful in 0s
CI / support (push) Successful in 1s
CI / user (push) Successful in 1s
CI / water (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / ws (push) Successful in 0s
This commit is contained in:
Binary file not shown.
@@ -318,13 +318,11 @@ message InternalSetRegisteredData {
|
|||||||
|
|
||||||
message UserImproveReq {
|
message UserImproveReq {
|
||||||
string avatar = 1;
|
string avatar = 1;
|
||||||
string nickname = 2;
|
string name = 2;
|
||||||
string birthday = 3;
|
string birthday = 3;
|
||||||
string mobile = 4;
|
string mobile = 4;
|
||||||
int32 gender = 5;
|
int32 gender = 5;
|
||||||
string password = 6;
|
string password = 6;
|
||||||
string district = 7;
|
|
||||||
string address = 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message FaceBindReq {
|
message FaceBindReq {
|
||||||
|
|||||||
@@ -253,13 +253,11 @@ func (x *InternalSetRegisteredData) GetOk() bool {
|
|||||||
type UserImproveReq struct {
|
type UserImproveReq struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Avatar string `protobuf:"bytes,1,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
Avatar string `protobuf:"bytes,1,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||||
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
Birthday string `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"`
|
Birthday string `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"`
|
||||||
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"`
|
||||||
Gender int32 `protobuf:"varint,5,opt,name=gender,proto3" json:"gender,omitempty"`
|
Gender int32 `protobuf:"varint,5,opt,name=gender,proto3" json:"gender,omitempty"`
|
||||||
Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
|
Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
|
||||||
District string `protobuf:"bytes,7,opt,name=district,proto3" json:"district,omitempty"`
|
|
||||||
Address string `protobuf:"bytes,8,opt,name=address,proto3" json:"address,omitempty"`
|
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -301,9 +299,9 @@ func (x *UserImproveReq) GetAvatar() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserImproveReq) GetNickname() string {
|
func (x *UserImproveReq) GetName() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Nickname
|
return x.Name
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
@@ -336,20 +334,6 @@ func (x *UserImproveReq) GetPassword() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserImproveReq) GetDistrict() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.District
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *UserImproveReq) GetAddress() string {
|
|
||||||
if x != nil {
|
|
||||||
return x.Address
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type FaceBindReq struct {
|
type FaceBindReq struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
FacePath string `protobuf:"bytes,1,opt,name=face_path,json=facePath,proto3" json:"face_path,omitempty"`
|
FacePath string `protobuf:"bytes,1,opt,name=face_path,json=facePath,proto3" json:"face_path,omitempty"`
|
||||||
@@ -2201,16 +2185,14 @@ const file_analysis_analysis_proto_rawDesc = "" +
|
|||||||
"\x18InternalSetRegisteredReq\x12\x0e\n" +
|
"\x18InternalSetRegisteredReq\x12\x0e\n" +
|
||||||
"\x02id\x18\x01 \x01(\x03R\x02id\"+\n" +
|
"\x02id\x18\x01 \x01(\x03R\x02id\"+\n" +
|
||||||
"\x19InternalSetRegisteredData\x12\x0e\n" +
|
"\x19InternalSetRegisteredData\x12\x0e\n" +
|
||||||
"\x02ok\x18\x01 \x01(\bR\x02ok\"\xe2\x01\n" +
|
"\x02ok\x18\x01 \x01(\bR\x02ok\"\xa4\x01\n" +
|
||||||
"\x0eUserImproveReq\x12\x16\n" +
|
"\x0eUserImproveReq\x12\x16\n" +
|
||||||
"\x06avatar\x18\x01 \x01(\tR\x06avatar\x12\x1a\n" +
|
"\x06avatar\x18\x01 \x01(\tR\x06avatar\x12\x12\n" +
|
||||||
"\bnickname\x18\x02 \x01(\tR\bnickname\x12\x1a\n" +
|
"\x04name\x18\x02 \x01(\tR\x04name\x12\x1a\n" +
|
||||||
"\bbirthday\x18\x03 \x01(\tR\bbirthday\x12\x16\n" +
|
"\bbirthday\x18\x03 \x01(\tR\bbirthday\x12\x16\n" +
|
||||||
"\x06mobile\x18\x04 \x01(\tR\x06mobile\x12\x16\n" +
|
"\x06mobile\x18\x04 \x01(\tR\x06mobile\x12\x16\n" +
|
||||||
"\x06gender\x18\x05 \x01(\x05R\x06gender\x12\x1a\n" +
|
"\x06gender\x18\x05 \x01(\x05R\x06gender\x12\x1a\n" +
|
||||||
"\bpassword\x18\x06 \x01(\tR\bpassword\x12\x1a\n" +
|
"\bpassword\x18\x06 \x01(\tR\bpassword\"*\n" +
|
||||||
"\bdistrict\x18\a \x01(\tR\bdistrict\x12\x18\n" +
|
|
||||||
"\aaddress\x18\b \x01(\tR\aaddress\"*\n" +
|
|
||||||
"\vFaceBindReq\x12\x1b\n" +
|
"\vFaceBindReq\x12\x1b\n" +
|
||||||
"\tface_path\x18\x01 \x01(\tR\bfacePath\"&\n" +
|
"\tface_path\x18\x01 \x01(\tR\bfacePath\"&\n" +
|
||||||
"\x10AgreementInfoReq\x12\x12\n" +
|
"\x10AgreementInfoReq\x12\x12\n" +
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ func (l *UserImproveLogic) UserImprove(in *analysis.UserImproveReq) (*analysis.R
|
|||||||
return common.FailResponse(utils.ErrorNotFund), nil
|
return common.FailResponse(utils.ErrorNotFund), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.Nickname != utils.StringEmpty || req.Avatar != utils.StringEmpty ||
|
if req.Name != utils.StringEmpty || req.Avatar != utils.StringEmpty ||
|
||||||
req.Birthday != utils.StringEmpty || req.Gender > utils.NumberZero ||
|
req.Birthday != utils.StringEmpty || req.Gender > utils.NumberZero ||
|
||||||
req.Mobile != utils.StringEmpty || req.Password != utils.StringEmpty {
|
req.Mobile != utils.StringEmpty || req.Password != utils.StringEmpty {
|
||||||
if st := l.updatePlatformUser(loginUser, bizId, req); st.Code != utils.Ok.Code {
|
if st := l.updatePlatformUser(loginUser, bizId, req); st.Code != utils.Ok.Code {
|
||||||
@@ -106,7 +106,7 @@ func (l *UserImproveLogic) updatePlatformUser(loginUser utils.UserInfo, bizId in
|
|||||||
return utils.ErrorParams
|
return utils.ErrorParams
|
||||||
}
|
}
|
||||||
|
|
||||||
name := req.Nickname
|
name := req.Name
|
||||||
if name == utils.StringEmpty {
|
if name == utils.StringEmpty {
|
||||||
name = info.Name
|
name = info.Name
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,11 @@ import "lone-services/pkg/validate"
|
|||||||
|
|
||||||
type UserImproveValidator struct {
|
type UserImproveValidator struct {
|
||||||
Avatar string
|
Avatar string
|
||||||
Nickname string
|
Name string
|
||||||
Birthday string
|
Birthday string
|
||||||
Mobile string
|
Mobile string
|
||||||
Gender int32 `validate:"omitempty,oneof=0 1 2 3"`
|
Gender int32 `validate:"omitempty,oneof=0 1 2 3"`
|
||||||
Password string
|
Password string
|
||||||
District string
|
|
||||||
Address string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p UserImproveValidator) GetMessage() validate.ValidatorMessages {
|
func (p UserImproveValidator) GetMessage() validate.ValidatorMessages {
|
||||||
|
|||||||
Reference in New Issue
Block a user