by Robin at 20240507 #408

Merged
chenhao merged 1 commits from feat-IRONFANS-113-Robin into test 2024-05-07 22:43:43 +08:00
1 changed files with 0 additions and 27 deletions
Showing only changes of commit 504b5135d7 - Show all commits

View File

@ -31,7 +31,6 @@ import (
zonemomentthumbsupproto "service/api/proto/zonemomentthumbsup/proto"
zonesessionproto "service/api/proto/zonesession/proto"
"service/apollostruct"
businessvalidator "service/app/mix/service/business_validator"
"service/bizcommon/common"
"service/bizcommon/util"
"service/dbstruct"
@ -1589,19 +1588,6 @@ func (s *Service) ApiCreateRealNameAuthentication(ctx *gin.Context, req *realnam
ec = errcode.ErrCodeRealNameAuthenticationSrvOk
// 1.业务校验,鉴权
result := businessvalidator.NewAuthBusinessValidator(ctx, req).
EnsureIsOperatingHisOwn(util.DerefInt64(req.RealNameAuthentication.Mid)).
QueryAccount(_DefaultAccount.OpListByMid).
EnsureAccountExist().
EnsureIsThisRole(consts.Streamer).
Validate().
Collect()
if ec = result[0].(errcode.ErrCode); ec != errcode.ErrCodeOk {
logger.Error("ApiCreateRealNameAuthentication business validation failed")
return
}
err := _DefaultRealNameAuthentication.OpCreate(ctx, &realname_authenticationproto.OpCreateReq{
RealNameAuthentication: req.RealNameAuthentication,
})
@ -1621,19 +1607,6 @@ func (s *Service) ApiCreateRealNameAuthentication(ctx *gin.Context, req *realnam
func (s *Service) ApiGetRealNameAuthenticationListByMid(ctx *gin.Context, req *realname_authenticationproto.ApiListReq) (vo *realname_authenticationproto.RealNameAuthenticationApiVO, ec errcode.ErrCode) {
ec = errcode.ErrCodeRealNameAuthenticationSrvOk
// 1.业务校验,鉴权
result := businessvalidator.NewAuthBusinessValidator(ctx, req).
EnsureIsOperatingHisOwn(util.DerefInt64(req.Mid)).
QueryAccount(_DefaultAccount.OpListByMid).
EnsureAccountExist().
EnsureIsThisRole(consts.Streamer).
Validate().
Collect()
if ec = result[0].(errcode.ErrCode); ec != errcode.ErrCodeOk {
logger.Error("OpCreateRealNameAuthentication business validation failed")
return
}
realname_authentication, err := _DefaultRealNameAuthentication.OpListByMid(ctx, &realname_authenticationproto.OpListByMidReq{
Mid: req.Mid,
})