From 504b5135d769f249616b8c6186d47994e0ecdbbc Mon Sep 17 00:00:00 2001 From: Leufolium Date: Tue, 7 May 2024 22:43:10 +0800 Subject: [PATCH] by Robin at 20240507 --- app/mix/service/apiservice.go | 27 --------------------------- 1 file changed, 27 deletions(-) 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, })