BUG-20240729 #656

Merged
chenhao merged 3 commits from BUG-20240729 into test 2024-07-29 13:15:38 +08:00
1 changed files with 9 additions and 3 deletions
Showing only changes of commit 5eeebd4206 - Show all commits

View File

@ -1462,12 +1462,18 @@ func (s *Service) OpReviewMoment(ctx *gin.Context, req *momentproto.OpReviewReq)
return
}
// 更新动态的状态
err := _DefaultMoment.OpUpdateByIdsAndStatus(ctx, &momentproto.OpUpdateReq{
// 更新请求,如果是通过,则恢复删除标志
updateReq := &momentproto.OpUpdateReq{
Moment: &dbstruct.Moment{
Status: goproto.Int64(finalMomentStatus),
},
}, req.MomentIds, consts.Moment_ManuallyReviewing)
}
if req.OpType == consts.MomentManuallyReview_Pass {
updateReq.Moment.DelFlag = goproto.Int64(consts.Exist)
}
// 更新动态的状态
err := _DefaultMoment.OpUpdateByIdsAndStatus(ctx, updateReq, req.MomentIds, consts.Moment_ManuallyReviewing)
if err != nil {
logger.Error("_DefaultMoment OpUpdateByIds fail, req: %v, err: %v", util.ToJson(req), err)
ec = errcode.ErrCodeMomentSrvFail