From 7d885c1d4c86f40927af50e6e7bfa13aac0c2180 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 21 十二月 2023 21:47:15 +0800
Subject: [PATCH] 1、common模块优化代码,Command命令中增加RTU命令结果返回webRul; 2、通信中间件增加了接收http下发RTU命令和内部命令的Controler; 3、RTU模拟器和控制器增加了上报完数据是否关闭TCP连接的控制。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java |   48 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
index a82ee98..37a45ae 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/recharge/RechargeSv.java
@@ -1,8 +1,11 @@
 package com.dy.pipIrrSell.recharge;
 
 import com.dy.common.webUtil.QueryResultVo;
+import com.dy.pipIrrGlobal.daoSe.SeRechargeHistoryMapper;
 import com.dy.pipIrrGlobal.daoSe.SeRechargeMapper;
-import com.dy.pipIrrGlobal.pojoSe.VoRecharge;
+import com.dy.pipIrrGlobal.pojoSe.SeRecharge;
+import com.dy.pipIrrGlobal.pojoSe.SeRechargeHistory;
+import com.dy.pipIrrGlobal.voSe.VoRecharge;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.common.utils.PojoUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -25,6 +28,9 @@
 public class RechargeSv {
     @Autowired
     private SeRechargeMapper seRechargeMapper;
+
+    @Autowired
+    private SeRechargeHistoryMapper seRechargeHistoryMapper;
 
     public QueryResultVo<List<VoRecharge>> getRecharges(QueryVo queryVo) {
         //瀹屽杽鏌ヨ鍏呭�艰褰曠殑璧锋鏃堕棿
@@ -55,5 +61,45 @@
         return rsVo ;
     }
 
+    /**
+     * 鏍规嵁姘村崱缂栧彿锛堜富閿級鍒犻櫎鍏呭�艰褰�
+     * @param cardId
+     * @return
+     */
+    //public Integer deleteByPrimaryKey(Long cardId) {
+    //    return seRechargeMapper.deleteByPrimaryKey(cardId);
+    //}
+
+    /**
+     * 娣诲姞鍏呭�艰褰�
+     * @param po
+     * @return
+     */
+    public Long add(SeRecharge po) {
+        seRechargeMapper.insert(po);
+        return po.getId();
+    }
+
+    /**
+     * 鏍规嵁姘村崱缂栧彿鍒犻櫎鍏呭�艰褰�
+     * @param cardNum
+     * @return
+     */
+    //public Integer deleteByCardId(Long cardId) {
+    //    return seRechargeMapper.deleteByCardId(cardId);
+    //}
+    public Integer deleteByCardNum(String cardNum) {
+        return seRechargeMapper.deleteByCardNum(cardNum);
+    }
+
+    /**
+     * 娣诲姞鍏呭�煎巻鍙茶〃
+     * @param po
+     * @return
+     */
+    public Long addHistory(SeRechargeHistory po){
+        seRechargeHistoryMapper.insert(po);
+        return po.getId();
+    }
 
 }

--
Gitblit v1.8.0