Merge branch 'feature-streamer_nick_audit-wxy-20241209' into test
This commit is contained in:
commit
fdba3a67dc
|
@ -388,15 +388,19 @@ func (s *Service) ApiUpdateAccount(ctx *gin.Context, req *accountproto.ApiUpdate
|
|||
|
||||
// 主播昵称需要先过审核
|
||||
if oldAccount.GetRole() == consts.Streamer && oldAccount.GetName() != req.Account.GetName() {
|
||||
// TODO:wxy, 测试日志
|
||||
logger.Info("ApiUpdateAccount test log, NewName: %v, auditStatus: %v", opUpdateReq.GetNewName(), opUpdateReq.GetAuditStatus())
|
||||
opUpdateReq.NewName = goproto.String(req.Account.GetName())
|
||||
auditStatus := s.SetAuditStatusBitMap(opUpdateReq.GetAuditStatus(), consts.StreamNikeAudit, consts.StreamerNikeNameAuditing)
|
||||
opUpdateReq.AuditStatus = goproto.Int64(auditStatus)
|
||||
// TODO:wxy, 测试日志
|
||||
logger.Info("ApiUpdateAccount test log, NewName: %v, auditStatus: %v", opUpdateReq.NewName, opUpdateReq.GetAuditStatus())
|
||||
logger.Info("ApiUpdateAccount test log, NewName: %v, auditStatus: %v", opUpdateReq.GetNewName(), opUpdateReq.GetAuditStatus())
|
||||
} else {
|
||||
opUpdateReq.Name = goproto.String(req.Account.GetName())
|
||||
}
|
||||
|
||||
// TODO:wxy, 测试日志
|
||||
logger.Info("ApiUpdateAccount test log,req: %v", util.ToJson(req))
|
||||
|
||||
// 用户只允许修改昵称和头像
|
||||
if err := _DefaultAccount.OpUpdate(ctx, opUpdateReq); err != nil {
|
||||
logger.Error("OpUpdate fail, req: %v, err: %v", util.ToJson(req), err)
|
||||
|
|
|
@ -274,6 +274,7 @@ func (s *Service) SetAuditStatusBitMap(auditStatus int64, auditType int, flag in
|
|||
auditStatus &^= consts.StreamerNikeNameAuditing
|
||||
}
|
||||
}
|
||||
|
||||
// TODO:wxy, 测试日志
|
||||
logger.Info("SetAuditStatusBitMap, auditStatus: %v", auditStatus)
|
||||
return auditStatus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue