by Robin at 20240702 #579

Merged
chenhao merged 1 commits from feat-IRONFANS-160-Robin into test 2024-07-02 16:29:31 +08:00
1 changed files with 6 additions and 0 deletions
Showing only changes of commit c9e50ef864 - Show all commits

View File

@ -536,6 +536,9 @@ func (s *Service) ApiCreateMomentBusinessValidate(ctx *gin.Context, req *momentp
ec = errcode.ErrCodeMomentSrvOk
resultList := businessvalidator.NewAuthBusinessValidator(ctx, req).
QueryAccount(_DefaultAccount.OpListByMid).
EnsureAccountExist().
EnsureIsThisRole(consts.Streamer).
EnsureMediaIsSuccessfullyUploaded(req.Moment.MediaComp).
EnsureSuchAccountPunishmentNotExist(req.GetBaseRequest().Mid, consts.AccountPunishment_BlockFromCreatingMoment, _DefaultAccountPunishment.OpListByMidAndType).
QueryMomentCreateTimes(_DefaultMomentCreateTimes.OpGetAndUpdate, req.GetBaseRequest().Mid).
@ -556,6 +559,9 @@ func (s *Service) ApiUpdateMomentBusinessValidate(ctx *gin.Context, req *momentp
ec = errcode.ErrCodeMomentSrvOk
resultList := businessvalidator.NewAuthBusinessValidator(ctx, req).
QueryAccount(_DefaultAccount.OpListByMid).
EnsureAccountExist().
EnsureIsThisRole(consts.Streamer).
EnsureMediaIsSuccessfullyUploaded(req.Moment.MediaComp).
Validate().
Collect()