diff --git a/app/mix/service/opservice_business_validation.go b/app/mix/service/opservice_business_validation.go index d3a525a2..bc8d18bc 100644 --- a/app/mix/service/opservice_business_validation.go +++ b/app/mix/service/opservice_business_validation.go @@ -9,7 +9,6 @@ import ( feedbackproto "service/api/proto/feedback/proto" imageaudittaskproto "service/api/proto/imageaudittask/proto" loginproto "service/api/proto/login/proto" - mediaproto "service/api/proto/media/proto" realname_authenticationproto "service/api/proto/realname_authentication/proto" streamerproto "service/api/proto/streamer/proto" streamerauthapprovalproto "service/api/proto/streamerauthapproval/proto" @@ -834,40 +833,6 @@ func (s *Service) OpGetUserWxAddCheckListBusinessValidate(ctx *gin.Context, req return } -func (s *Service) MediaAuthBusinessValidate(ctx *gin.Context, req *mediaproto.MediaAuthReq) (ec errcode.ErrCode) { - ec = errcode.ErrCodeMediaSrvOk - - // 1.业务校验 - result := businessvalidator.NewAuthBusinessValidator(ctx, req). - QueryAccount(_DefaultAccount.OpListByMid). - EnsureAccountExist(). - EnsureIsOpRole(). - Validate(). - Collect() - if ec = result[0].(errcode.ErrCode); ec != errcode.ErrCodeOk { - logger.Error("MediaAuth business validation failed") - return - } - return -} - -func (s *Service) CUploadBusinessValidate(ctx *gin.Context, req *mediaproto.CUploadReq) (ec errcode.ErrCode) { - ec = errcode.ErrCodeMediaSrvOk - - // 1.业务校验 - result := businessvalidator.NewAuthBusinessValidator(ctx, req). - QueryAccount(_DefaultAccount.OpListByMid). - EnsureAccountExist(). - EnsureIsOpRole(). - Validate(). - Collect() - if ec = result[0].(errcode.ErrCode); ec != errcode.ErrCodeOk { - logger.Error("CUpload business validation failed") - return - } - return -} - func (s *Service) OpGetRealNameAuthenticationListBusinessValidate(ctx *gin.Context, req *realname_authenticationproto.OpListReq) (ec errcode.ErrCode) { ec = errcode.ErrCodeRealNameAuthenticationSrvOk diff --git a/app/mix/service/service.go b/app/mix/service/service.go index d4f6e5a2..ede0f25f 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -1482,6 +1482,16 @@ func (s *Service) OpGetStreamerListByMid(ctx *gin.Context, req *streamerproto.Op ec = errcode.ErrCodeStreamerSrvFail return } + userVas, err := _DefaultVas.GetUserVasInfo(ctx, util.DerefInt64(streamer.Mid)) + if err != nil { + logger.Error("GetUserVasInfo fail, req: %v, err: %v", util.ToJson(req), err) + ec = errcode.ErrCodeStreamerSrvFail + return + } + streamer.WechatLockType = goproto.Int32(userVas.WechatLockType) + streamer.WechatContact = goproto.String(userVas.WechatContact) + streamer.WechatCoinPrice = goproto.Int64(userVas.WechatCoinPrice) + return } @@ -2041,38 +2051,6 @@ func (s *Service) OpGetUserWxAddCheckList(ctx *gin.Context, req *userwxaddcheckp return } -func (s *Service) MediaAuth(ctx *gin.Context, req *mediaproto.MediaAuthReq) (policyToken *mediaproto.PolicyToken, ec errcode.ErrCode) { - ec = errcode.ErrCodeMediaSrvOk - - if ec = s.MediaAuthBusinessValidate(ctx, req); ec != errcode.ErrCodeMediaSrvOk { - return - } - - policyToken, err := _DefaultMedia.GetPolicyToken(req.Mtype) - if err != nil { - logger.Error("GetPolicyToken fail, req: %v, err: %v", util.ToJson(req), err) - ec = errcode.ErrCodeMediaSrvFail - return - } - return -} - -func (s *Service) CUpload(ctx *gin.Context, req *mediaproto.CUploadReq) (ret interface{}, ec errcode.ErrCode) { - ec = errcode.ErrCodeMediaSrvOk - - if ec = s.CUploadBusinessValidate(ctx, req); ec != errcode.ErrCodeMediaSrvOk { - return - } - - ret, err := _DefaultMedia.Upload(ctx, req.Mtype, req.Item) - if err != nil { - logger.Error("Upload fail, req: %v, err: %v", util.ToJson(req), err) - ec = errcode.ErrCodeMediaUploadFail - return - } - return -} - // 媒体 func (s *Service) GetImageByIds(ctx *gin.Context, req *mediaproto.ImageListReq) (list []*dbstruct.Image, ec errcode.ErrCode) { ec = errcode.ErrCodeMediaSrvOk