From 29ada178b733e255f22eaa246c2e16382506557f Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期三, 16 十月 2024 09:13:13 +0800
Subject: [PATCH] 2024-10-16 朱宝民 优化获取交易记录接口(getSummaries)

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml                                     |    3 ++-
 pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java |    7 -------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml
index 8fbf4cd..9499940 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeGeneralMapper.xml
@@ -250,7 +250,7 @@
   <!--鑾峰彇鎸囧畾鏃ユ湡銆佹寚瀹氭敹閾跺憳銆佹寚瀹氭敮浠樻柟寮忓疄鏀堕噾棰濆悎璁�-->
   <select id="getPaymentSums" resultType="java.lang.Float">
     SELECT
-    SUM(ope.trade_amount) AS tradeAmount
+        (SUM(ope.trade_amount) + SUM(ope.card_cost)) AS tradeAmount
     FROM se_card_operate ope
     <where>
       AND ope.operate_valid = 2
@@ -305,6 +305,7 @@
         INNER JOIN ba_user us ON us.id = ope.operator
     <where>
       AND ope.operate_type IN(1,2,3,4,5)
+      AND ope.operate_valid = 2
       <if test = "cashierId != null and cashierId > 0">
         AND us.id = #{cashierId}
       </if>
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
index c68002e..9392245 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerCtrl.java
@@ -226,19 +226,12 @@
     @SneakyThrows(IOException.class)
     @RequestMapping(value = "/export", method = RequestMethod.GET)
     public void export(HttpServletResponse response, QueryVo vo) {
-        //setExcelRespProp(response, "鎺у埗鍣ㄥ垪琛�");
         List<VoController> controllerList = controllerSv.export(vo);
         ExcelUtil.setExcelRespProp(response, "鎺у埗鍣ㄥ垪琛�" + LocalDate.now());
         EasyExcel.write(response.getOutputStream(), VoController.class)
                 .registerWriteHandler(new CellWriteHandler("鎺у埗鍣ㄥ垪琛�"))
                 .sheet("鎺у埗鍣�")
                 .doWrite(controllerList);
-
-        //EasyExcel.write(response.getOutputStream())
-        //        .head(VoController.class)
-        //        .excelType(ExcelTypeEnum.XLSX)
-        //        .sheet("鎺у埗鍣ㄥ垪琛�")
-        //        .doWrite(memberList);
     }
 
     /**

--
Gitblit v1.8.0