by Robin at 20240411

This commit is contained in:
Leufolium 2024-04-11 20:58:26 +08:00
parent 159b16a8a7
commit 99116d4f31
2 changed files with 9 additions and 0 deletions

View File

@ -2248,11 +2248,14 @@ func (s *Service) ApiCreateZoneMoment(ctx *gin.Context, req *zonemomentproto.Api
req.ZoneMoment.Status = goproto.Int64(consts.ZoneMoment_Auditing) // 默认正在审核中
if req.ZoneMoment.MediaComp != nil && len(req.ZoneMoment.MediaComp.GetImageIds()) > 0 {
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.ImageAudit_Created) // 创建
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetImageIds())))
} else {
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.ImageAudit_Passed) // 视频贴默认已通过
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetVideoIds())))
}
req.ZoneMoment.TextAuditStatus = goproto.Int64(consts.TextAudit_Created) // 创建
req.ZoneMoment.ManuallyReviewStatus = goproto.Int64(consts.ZoneMomentManuallyReview_Waiting) // 等待复审
err := _DefaultZoneMoment.OpCreate(ctx, &zonemomentproto.OpCreateReq{
BaseRequest: req.BaseRequest,
ZoneMoment: req.ZoneMoment,
@ -2292,6 +2295,10 @@ func (s *Service) ApiUpdateZoneMoment(ctx *gin.Context, req *zonemomentproto.Api
isReauditRequired = true
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.ImageAudit_Created) // 创建
req.ZoneMoment.ImageAuditOpinion = goproto.String("") // 信息抹除
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetImageIds())))
}
if req.ZoneMoment.MediaComp != nil && util.DerefInt64(req.ZoneMoment.MType) == consts.MediaTypeVideo {
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetVideoIds())))
}
if req.ZoneMoment.Text != nil {
isReauditRequired = true

View File

@ -3197,8 +3197,10 @@ func (s *Service) OpCreateZoneMoment(ctx *gin.Context, req *zonemomentproto.OpCr
req.ZoneMoment.Status = goproto.Int64(consts.ZoneMoment_Auditing) // 默认正在审核中
if req.ZoneMoment.MediaComp != nil && len(req.ZoneMoment.MediaComp.GetImageIds()) > 0 {
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.ImageAudit_Created) // 创建
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetImageIds())))
} else {
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.ImageAudit_Passed) // 视频贴默认已通过
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetVideoIds())))
}
req.ZoneMoment.TextAuditStatus = goproto.Int64(consts.TextAudit_Created) // 创建
req.ZoneMoment.ManuallyReviewStatus = goproto.Int64(consts.ZoneMomentManuallyReview_Waiting) // 等待复审