diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index 9103acf5..40da121a 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -3318,7 +3318,7 @@ func (m *Mongo) UpdateMomentAuditTaskByTextAuditTaskIds(ctx *gin.Context, moment return err } -func (m *Mongo) UpdateMomentAuditTaskByMomentIdsAndStatus(ctx *gin.Context, moment_audit_task *dbstruct.MomentAuditTask, momentIds []int64, status int64) error { +func (m *Mongo) UpdateMomentAuditTaskByMomentIdsAndStatus(ctx *gin.Context, moment_audit_task *dbstruct.MomentAuditTask, momentIds []string, status int64) error { col := m.getColMomentAuditTask() set := util.EntityToM(moment_audit_task) set["ut"] = time.Now().Unix() @@ -3329,7 +3329,7 @@ func (m *Mongo) UpdateMomentAuditTaskByMomentIdsAndStatus(ctx *gin.Context, mome "associative_table_id": qmgo.M{ "$in": momentIds, }, - "status": status, + "manually_review_status": status, } _, err := col.UpdateAll(ctx, filter, up) return err diff --git a/app/mix/service/logic/moment_audit_task.go b/app/mix/service/logic/moment_audit_task.go index c8d378bf..55e59cc2 100644 --- a/app/mix/service/logic/moment_audit_task.go +++ b/app/mix/service/logic/moment_audit_task.go @@ -92,7 +92,7 @@ func (p *MomentAuditTask) OpUpdateByTextAuditTaskIds(ctx *gin.Context, moment_au return nil } -func (p *MomentAuditTask) OpUpdateByMomentIdsAndStatus(ctx *gin.Context, moment_audit_task *dbstruct.MomentAuditTask, momentIds []int64, status int64) error { +func (p *MomentAuditTask) OpUpdateByMomentIdsAndStatus(ctx *gin.Context, moment_audit_task *dbstruct.MomentAuditTask, momentIds []string, status int64) error { err := p.store.UpdateMomentAuditTaskByMomentIdsAndStatus(ctx, moment_audit_task, momentIds, status) if err != nil { logger.Error("UpdateMomentAuditTaskByMomentIdAndStatus fail, err: %v", err) diff --git a/app/mix/service/service.go b/app/mix/service/service.go index ead10cf3..e5841f12 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -1384,10 +1384,14 @@ func (s *Service) OpReviewMoment(ctx *gin.Context, req *momentproto.OpReviewReq) } // 更新动态审核表的状态 + momentStrIds := make([]string, 0) + for _, id := range req.MomentIds { + momentStrIds = append(momentStrIds, fmt.Sprint(id)) + } err = _DefaultMomentAuditTask.OpUpdateByMomentIdsAndStatus(ctx, &dbstruct.MomentAuditTask{ - Status: goproto.Int64(finalMomentAuditTaskStatus), + ManuallyReviewStatus: goproto.Int64(finalMomentAuditTaskStatus), ManuallyReviewOperator: goproto.Int64(req.BaseRequest.Mid), - }, req.MomentIds, consts.MomentManuallyReview_Waiting) + }, momentStrIds, consts.MomentManuallyReview_Waiting) if err != nil { logger.Error("_DefaultMomentAuditTask OpUpdateByMomentIdsAndStatus fail, req: %v, err: %v", util.ToJson(req), err) ec = errcode.ErrCodeMomentSrvFail