Merge remote-tracking branch 'origin/feature-streamer_nick_audit-wxy-20241209' into test

This commit is contained in:
wangxinyu 2024-12-17 15:59:12 +08:00
commit 468e6222c8
1 changed files with 2 additions and 2 deletions

View File

@ -387,11 +387,11 @@ func (s *Service) ApiUpdateAccount(ctx *gin.Context, req *accountproto.ApiUpdate
}
// 主播昵称需要先过审核
if oldAccount.GetRole() == consts.Streamer && oldAccount.GetName() != req.Account.GetName() {
if oldAccount.GetRole() == consts.Streamer && (oldAccount.GetName() != req.Account.GetName() || oldAccount.GetNewName() != req.Account.GetNewName()) {
opUpdateReq.NewName = goproto.String(req.Account.GetName())
auditStatus := s.SetAuditStatusBitMap(oldAccount.GetAuditStatus(), consts.StreamNikeAudit, consts.StreamerNikeNameAuditing)
opUpdateReq.AuditStatus = goproto.Int64(auditStatus)
} else {
} else if oldAccount.GetName() != req.Account.GetName() && req.Account.GetNewName() != "" {
opUpdateReq.Name = goproto.String(req.Account.GetName())
}