From 49500246d5ef7b3f5dfdbeda33d65df0ba507f2f Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期五, 02 八月 2024 09:53:12 +0800 Subject: [PATCH] 问题反馈回复 增加、删除、修改、分页查询 --- pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java | 39 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java index 6ebe08b..ccc704d 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java @@ -6,6 +6,7 @@ import com.dy.pipIrrGlobal.pojoOp.OpeFeedback; import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply; import com.dy.pipIrrGlobal.voOp.Vofeedback; +import com.dy.pipIrrGlobal.voOp.VofeedbackReply; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.common.utils.PojoUtils; @@ -83,7 +84,7 @@ } /** - * 闂鍙嶉鍥炲 + * 娣诲姞闂鍙嶉鍥炲 * @param reply * @return */ @@ -91,4 +92,40 @@ reply.setReplyTime(new Date()); return opeFeedbackReplyMapper.insertSelective(reply); } + + /** + * 淇敼闂鍙嶉鍥炲 + * @param reply + * @return + */ + public int updateReply(OpeFeedbackReply reply) { + reply.setReplyTime(new Date()); + return opeFeedbackReplyMapper.updateByPrimaryKeySelective(reply); + } + + /** + * 鍒犻櫎闂鍙嶉鍥炲 + * @param id + * @return + */ + public Integer deleteReply(Long id) { + return opeFeedbackReplyMapper.deleteByPrimaryKey(id); + } + + /** + * 鑾峰彇鍙嶉鍥炲 + * @param qo + * @return + */ + public QueryResultVo<List<VofeedbackReply>> getFeedbackReply(ReplyQueryVo qo) { + Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); + Long itemTotal = opeFeedbackReplyMapper.getRecordCount(params); + + QueryResultVo<List<VofeedbackReply>> rsVo = new QueryResultVo<>(); + rsVo.pageSize = qo.pageSize; + rsVo.pageCurr = qo.pageCurr; + rsVo.calculateAndSet(itemTotal, params); + rsVo.obj = opeFeedbackReplyMapper.getFeedbackReply(params); + return rsVo; + } } -- Gitblit v1.8.0