by Robin at 20240429

This commit is contained in:
Leufolium 2024-04-29 15:31:54 +08:00
parent 007cef3d1a
commit b67c503e80
4 changed files with 12 additions and 23 deletions

View File

@ -4258,17 +4258,8 @@ func (m *Mongo) TryToCompleteZoneMomentAudit(ctx *gin.Context, zonemomentId int6
filter := qmgo.M{
"_id": zonemomentId,
"manually_review_status": consts.ZoneMomentManuallyReview_Waiting,
"$or": []qmgo.M{
{
"image_audit_status": qmgo.M{
"$ne": consts.ImageAudit_Created,
},
},
{
"video_moderation_status": qmgo.M{
"$ne": consts.VideoModeration_Created,
},
},
"image_audit_status": qmgo.M{
"$ne": consts.ImageAudit_Created,
},
"text_audit_status": qmgo.M{
"$ne": consts.TextAudit_Created,

View File

@ -2477,7 +2477,7 @@ func (s *Service) ApiCreateZoneMoment(ctx *gin.Context, req *zonemomentproto.Api
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.ImageAudit_Created) // 创建
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetImageIds())))
} else {
req.ZoneMoment.VideoModerationStatus = goproto.Int64(consts.VideoModeration_Created) // 视频贴默认已通过
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.VideoModeration_Created)
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetVideoIds())))
}
req.ZoneMoment.TextAuditStatus = goproto.Int64(consts.TextAudit_Created) // 创建
@ -2546,8 +2546,8 @@ func (s *Service) ApiUpdateZoneMoment(ctx *gin.Context, req *zonemomentproto.Api
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetImageIds())))
}
if req.ZoneMoment.MediaComp != nil && req.ZoneMoment.GetMType() == consts.MediaTypeVideo {
req.ZoneMoment.VideoModerationStatus = goproto.Int64(consts.VideoModeration_Created) // 创建
req.ZoneMoment.VideoModerationOpinion = goproto.String("") // 信息抹除
req.ZoneMoment.ImageAuditStatus = goproto.Int64(consts.VideoModeration_Created) // 创建
req.ZoneMoment.ImageAuditOpinion = goproto.String("") // 信息抹除
req.ZoneMoment.MediaAmount = goproto.Int64(int64(len(req.ZoneMoment.MediaComp.GetVideoIds())))
}
if req.ZoneMoment.Text != nil {

View File

@ -56,8 +56,8 @@ func (handler *VideoModerationTaskResultHandler) generateZoneMomentMediaComponen
if option == consts.VideoModerationTaskUpdate_Success {
err := _DefaultZoneMoment.OpUpdate(ctx, &zonemomentproto.OpUpdateReq{
ZoneMoment: &dbstruct.ZoneMoment{
Id: task.AssociativeTableId,
VideoModerationStatus: goproto.Int64(consts.VideoModeration_Passed),
Id: task.AssociativeTableId,
ImageAuditStatus: goproto.Int64(consts.VideoModeration_Passed),
},
})
if err != nil {
@ -80,9 +80,9 @@ func (handler *VideoModerationTaskResultHandler) generateZoneMomentMediaComponen
err := _DefaultZoneMoment.OpUpdate(ctx, &zonemomentproto.OpUpdateReq{
ZoneMoment: &dbstruct.ZoneMoment{
Id: task.AssociativeTableId,
VideoModerationStatus: task.Status,
VideoModerationOpinion: goproto.String(videoModerationOpinion.String()),
Id: task.AssociativeTableId,
ImageAuditStatus: task.Status,
ImageAuditOpinion: goproto.String(videoModerationOpinion.String()),
},
})
if err != nil {

View File

@ -18,12 +18,10 @@ type ZoneMoment struct {
ProductId *int64 `json:"product_id" bson:"product_id"` // 商品id(单帖商品或超粉商品id)
ThumbsUpNum *int64 `json:"thumbs_up_num" bson:"thumbs_up_num"` // 点赞次数
Status *int64 `json:"status" bson:"status"` // 审批状态
ImageAuditStatus *int64 `json:"image_audit_status" bson:"image_audit_status"` // 图像审核状态
VideoModerationStatus *int64 `json:"video_moderation_status" bson:"video_moderation_status"` // 视频审核状态
ImageAuditStatus *int64 `json:"image_audit_status" bson:"image_audit_status"` // 媒体审核状态
TextAuditStatus *int64 `json:"text_audit_status" bson:"text_audit_status"` // 文字审核状态
ManuallyReviewStatus *int64 `json:"manually_review_status" bson:"manually_review_status"` // 人工复审状态
ImageAuditOpinion *string `json:"image_audit_opinion" bson:"image_audit_opinion"` // 图像审核意见
VideoModerationOpinion *string `json:"video_moderation_opinion" bson:"video_moderation_opinion"` // 视频审核意见
ImageAuditOpinion *string `json:"image_audit_opinion" bson:"image_audit_opinion"` // 媒体审核意见
TextAuditOpinion *string `json:"text_audit_opinion" bson:"text_audit_opinion"` // 文字审核意见
ManuallyReviewOpinion *string `json:"manually_review_opinion" bson:"manually_review_opinion"` // 人工复审意见
ManuallyReviewOperator *int64 `json:"manually_review_operator" bson:"manually_review_operator"` // 人工复审操作人