From 4acdf28be7df0b59882de810481f6a8f53fddc87 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 29 十月 2024 16:42:13 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/java/com/dy/pipIrrOperation/feedback/FeedbackSv.java | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 113 insertions(+), 0 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 2977e0c..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
@@ -1,8 +1,21 @@
package com.dy.pipIrrOperation.feedback;
+import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoOp.OpeFeedbackMapper;
+import com.dy.pipIrrGlobal.daoOp.OpeFeedbackReplyMapper;
+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;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
/**
* @author ZhuBaoMin
@@ -15,4 +28,104 @@
@Service
@RequiredArgsConstructor
public class FeedbackSv {
+ @Autowired
+ private OpeFeedbackMapper opeFeedbackMapper;
+
+ @Autowired
+ private OpeFeedbackReplyMapper opeFeedbackReplyMapper;
+
+ /**
+ * 娣诲姞闂鍙嶉
+ * @param feedback
+ * @return
+ */
+ public int add(OpeFeedback feedback) {
+ feedback.setState((byte)0);
+ feedback.setFeedbackTime(new Date());
+ int i = opeFeedbackMapper.insertSelective(feedback);
+ return i;
+ }
+
+ /**
+ * 淇敼闂鍙嶉鐘舵��
+ * @param feedback
+ * @return
+ */
+ public int update(OpeFeedback feedback) {
+ int i = opeFeedbackMapper.updateByPrimaryKeySelective(feedback);
+ return i;
+ }
+
+ /**
+ * 鍒犻櫎闂鍙嶉
+ * @param id
+ * @return
+ */
+ public int delete(Long id) {
+ int i = opeFeedbackMapper.deleteByPrimaryKey(id);
+ return i;
+ }
+
+ /**
+ * 鑾峰彇闂鍙嶉
+ * @param qo
+ * @return
+ */
+ public QueryResultVo<List<Vofeedback>> getFeedbacks(QueryVo qo) {
+ Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo);
+ Long itemTotal = opeFeedbackMapper.getRecordCount(params);
+
+ QueryResultVo<List<Vofeedback>> rsVo = new QueryResultVo<>();
+ rsVo.pageSize = qo.pageSize;
+ rsVo.pageCurr = qo.pageCurr;
+ rsVo.calculateAndSet(itemTotal, params);
+ rsVo.obj = opeFeedbackMapper.getFeedbacks(params);
+ return rsVo;
+ }
+
+ /**
+ * 娣诲姞闂鍙嶉鍥炲
+ * @param reply
+ * @return
+ */
+ public Integer addReply(OpeFeedbackReply reply) {
+ 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