by Robin at 20240729

This commit is contained in:
Leufolium 2024-07-29 13:15:11 +08:00
parent af2b7c9d18
commit 5eeebd4206
1 changed files with 9 additions and 3 deletions

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