feat: user improve
CI / changes (push) Successful in 1m31s
CI / ad (push) Successful in 32s
CI / admin (push) Successful in 26s
CI / analysis (push) Successful in 28s
CI / bff (push) Successful in 23s
CI / chore (push) Successful in 24s
CI / equipment (push) Successful in 21s
CI / express (push) Successful in 21s
CI / factory (push) Successful in 18s
CI / message (push) Successful in 18s
CI / order (push) Successful in 21s
CI / payment (push) Successful in 20s
CI / percutaneous (push) Successful in 19s
CI / product (push) Successful in 21s
CI / record (push) Successful in 21s
CI / sale (push) Successful in 20s
CI / store (push) Successful in 25s
CI / support (push) Successful in 21s
CI / task (push) Successful in 20s
CI / user (push) Successful in 22s
CI / water (push) Successful in 20s
CI / wecom (push) Successful in 21s
CI / ws (push) Successful in 8s

This commit is contained in:
zzw
2026-10-27 13:01:24 +08:00
parent 70543fbcb0
commit b77a1f1b95
20 changed files with 1110 additions and 171 deletions
@@ -106,33 +106,24 @@ func (l *UserImproveLogic) updatePlatformUser(loginUser utils.UserInfo, bizId in
return utils.ErrorParams
}
name := req.Name
if name == utils.StringEmpty {
name = info.Name
}
avatar := req.Avatar
if avatar == utils.StringEmpty {
avatar = info.Avatar
}
gender := uint32(req.Gender)
if gender == utils.NumberZero {
gender = info.Gender
}
birthday := req.Birthday
if birthday == utils.StringEmpty {
birthday = info.Birthday
}
updateReq := &userpb.InternalUpdateReq{
BizId: bizId,
SubjectType: "user",
Mobile: mobile,
Name: name,
Avatar: avatar,
Gender: gender,
Birthday: birthday,
ClientCode: []string{loginUser.ClientCode},
}
if req.Name != utils.StringEmpty {
updateReq.Name = req.Name
}
if req.Avatar != utils.StringEmpty {
updateReq.Avatar = req.Avatar
}
if req.Gender > utils.NumberZero {
updateReq.Gender = uint32(req.Gender)
}
if req.Birthday != utils.StringEmpty {
updateReq.Birthday = req.Birthday
}
if req.Password != utils.StringEmpty {
updateReq.CredentialType = []string{"password"}
updateReq.Secret = req.Password