This commit is contained in:
parent
73b7488edf
commit
697fb1aa8b
app/mix
|
@ -4194,6 +4194,22 @@ func (m *Mongo) TryToFinishVideoModerationTaskOfMoment(ctx *gin.Context, task *d
|
|||
return &instance, nil
|
||||
}
|
||||
|
||||
func (m *Mongo) GetMomentAuditTaskListByIds(ctx *gin.Context, ids []int64) ([]*dbstruct.MomentAuditTask, error) {
|
||||
list := make([]*dbstruct.MomentAuditTask, 0)
|
||||
col := m.getColMomentAuditTask()
|
||||
query := qmgo.M{
|
||||
"_id": qmgo.M{
|
||||
"$in": ids,
|
||||
},
|
||||
}
|
||||
err := col.Find(ctx, query).All(&list)
|
||||
if err == qmgo.ErrNoSuchDocuments {
|
||||
err = nil
|
||||
return list, err
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// 联系客服对话表相关
|
||||
func (m *Mongo) CreateContactCustomerServiceSession(ctx *gin.Context, contact_customer_service_session *dbstruct.ContactCustomerServiceSession) error {
|
||||
col := m.getColContactCustomerServiceSession()
|
||||
|
|
|
@ -2205,7 +2205,7 @@ func (s *Service) ApiCreateMoment(ctx *gin.Context, req *momentproto.ApiCreateRe
|
|||
|
||||
// 封装动态审核任务
|
||||
momentAuditTask := &dbstruct.MomentAuditTask{
|
||||
AssociativeTableId: goproto.String(fmt.Sprint(util.DerefInt64(req.Moment.Id))),
|
||||
AssociativeTableId: goproto.String(fmt.Sprint(req.Moment.GetId())),
|
||||
AuditedMedia: req.Moment.MediaComp,
|
||||
AuditedText: req.Moment.Text,
|
||||
Status: goproto.Int64(consts.MomentAudit_Created),
|
||||
|
|
|
@ -129,3 +129,12 @@ func (p *MomentAuditTask) TryToFinishVideoModerationTask(ctx *gin.Context, task
|
|||
}
|
||||
return instance.GetImageAuditTaskStatus() != consts.ImageAudit_Created && instance.GetTextAuditTaskStatus() != consts.TextAudit_Created, nil
|
||||
}
|
||||
|
||||
func (p *MomentAuditTask) GetByIds(ctx *gin.Context, ids []int64) ([]*dbstruct.MomentAuditTask, error) {
|
||||
list, err := p.store.GetMomentAuditTaskListByIds(ctx, ids)
|
||||
if err != nil {
|
||||
logger.Error("GetMomentAuditTaskListByIds fail, err: %v", err)
|
||||
return make([]*dbstruct.MomentAuditTask, 0), err
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
|
|
@ -3486,7 +3486,7 @@ func (s *Service) OpGetMomentAuditTaskList(ctx *gin.Context, req *moment_audit_t
|
|||
return
|
||||
}
|
||||
|
||||
req.ManuallyReviewStatus = goproto.Int64(consts.MomentManuallyReview_Waiting)
|
||||
// req.ManuallyReviewStatus = goproto.Int64(consts.MomentManuallyReview_Waiting)
|
||||
list, err := _DefaultMomentAuditTask.OpList(ctx, req)
|
||||
if err != nil {
|
||||
logger.Error("OpGetMomentAuditTaskList fail, req: %v, err: %v", util.ToJson(req), err)
|
||||
|
|
Loading…
Reference in New Issue