diff --git a/app/mix/service/apiservice_business_validation.go b/app/mix/service/apiservice_business_validation.go index 7970380f..62ffdd48 100644 --- a/app/mix/service/apiservice_business_validation.go +++ b/app/mix/service/apiservice_business_validation.go @@ -550,11 +550,13 @@ func (s *Service) ApiCreateZoneMomentBusinessValidate(ctx *gin.Context, req *zon ec = errcode.ErrCodeMomentSrvOk pType := int64(0) + mediaVisibleRange := int64(0) switch req.ZoneMoment.GetCType() { case consts.ZoneMomentCType_Free: pType = consts.AccountPunishment_BlockFromCreatingFreeZoneMoment case consts.ZoneMomentCType_Paid: pType = consts.AccountPunishment_BlockFromCreatingPaidZoneMoment + mediaVisibleRange = req.ZoneMoment.GetMediaVisibleRange() } resultList := businessvalidator.NewAuthBusinessValidator(ctx, req). @@ -565,7 +567,7 @@ func (s *Service) ApiCreateZoneMomentBusinessValidate(ctx *gin.Context, req *zon EnsureSuchAccountPunishmentNotExist(req.GetBaseRequest().Mid, pType, _DefaultAccountPunishment.OpListByMidAndType). EnsureZoneMomentCreateTimesNotReachedDailyUpperbound(_DefaultZoneMomentCreateTimes.OpGetAndUpdate, req.GetBaseRequest().Mid). EnsureAmongZoneMomentsPaidItemsLessThanFreeItems(_DefaultZoneMoment.OpCountByMidAndCType, req.GetBaseRequest().Mid, req.ZoneMoment.GetCType()). - EnsureZoneMomentImagesEnoughForEncryption(req.ZoneMoment.GetMType(), req.ZoneMoment.MediaComp, req.ZoneMoment.GetMediaVisibleRange()). + EnsureZoneMomentImagesEnoughForEncryption(req.ZoneMoment.GetMType(), req.ZoneMoment.MediaComp, mediaVisibleRange). Validate(). Collect() ec, _ = resultList[0].(errcode.ErrCode) @@ -634,7 +636,7 @@ func (s *Service) ApiCreateZoneCollaboratorBusinessValidate(ctx *gin.Context, re ec = errcode.ErrCodeZoneCollaboratorWrongCollaborator } if ec != errcode.ErrCodeOk { - logger.Error("ApiGetAccountRelationCount business validation failed") + logger.Error("ApiCreateZoneCollaborator business validation failed") return }