by Robin at 20240522 #471

Merged
chenhao merged 1 commits from feat-IRONFANS-118-Robin-2 into test 2024-05-22 22:57:15 +08:00
1 changed files with 4 additions and 3 deletions
Showing only changes of commit 3b9f56d149 - Show all commits

View File

@ -1,6 +1,7 @@
package service
import (
"service/api/base"
"service/api/errcode"
accountproto "service/api/proto/account/proto"
accountpunishmentproto "service/api/proto/accountpunishment/proto"
@ -1439,7 +1440,7 @@ func (s *Service) OpUpdateZoneThirdPartnerBusinessValidate(ctx *gin.Context, req
Validate().
Collect()
if ec = result[0].(errcode.ErrCode); ec != errcode.ErrCodeOk {
logger.Error("OpHeadMoment business validation failed")
logger.Error("OpUpdateZoneThirdPartner business validation failed")
return
}
return
@ -1448,7 +1449,7 @@ func (s *Service) OpUpdateZoneThirdPartnerBusinessValidate(ctx *gin.Context, req
func (s *Service) OpDeleteZoneThirdPartnerBusinessValidate(ctx *gin.Context, zid int64) (ec errcode.ErrCode) {
ec = errcode.ErrCodeZoneThirdPartnerSrvOk
// 1.业务校验
result := businessvalidator.NewAuthBusinessValidator(ctx, nil).
result := businessvalidator.NewAuthBusinessValidator(ctx, &base.BaseRequest{}).
EnsureZoneThirdPartnerSharingRatioIsEnough(func(ctx *gin.Context, zid int64) ([]*dbstruct.ZoneCollaborator, error) {
return _DefaultZoneCollaborator.OpList(ctx, &zone_collaborator_proto.OpListReq{
Zid: goproto.Int64(zid),
@ -1457,7 +1458,7 @@ func (s *Service) OpDeleteZoneThirdPartnerBusinessValidate(ctx *gin.Context, zid
Validate().
Collect()
if ec = result[0].(errcode.ErrCode); ec != errcode.ErrCodeOk {
logger.Error("OpHeadMoment business validation failed")
logger.Error("OpDeleteZoneThirdPartner business validation failed")
return
}
return