Merge branch 'feature-streamer_nick_audit-wxy-20241209' into test

This commit is contained in:
wangxinyu 2024-12-11 18:00:12 +08:00
commit fdba3a67dc
2 changed files with 8 additions and 3 deletions

View File

@ -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)

View File

@ -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
}