Merge pull request 'by Robin at 20240702' (#579) from feat-IRONFANS-160-Robin into test

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/579
This commit is contained in:
chenhao 2024-07-02 16:29:30 +08:00
commit e7f4943ffd
1 changed files with 6 additions and 0 deletions

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()