Merge pull request 'by Robin at 20240507' (#407) from feat-IRONFANS-113-Robin into main
Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/407
This commit is contained in:
commit
0422cb6926
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue