diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index a42f6011..51e3d3df 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -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, })