From 4602ddaa6f8c408411aa6521b1f70ba3af629713 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 23 Jul 2021 09:54:36 +0800
Subject: [PATCH] 202107023

---
 gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml b/gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml
index 01997c5..dac82a6 100644
--- a/gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml
+++ b/gc-order/src/main/resources/mapper/order/JhyOrderMapper.xml
@@ -48,13 +48,27 @@
         select
            status,
            count(1) cnt
-        from xzx_jhy_order where status=1
+        from xzx_jhy_order
+        <where>
+            status=1
+            <if test="type == 2">
+                and user_id=#{userId}
+            </if>
+        </where>
+        group by status
         union  all
         select
            status,
            count(1) cnt
         from xzx_jhy_order
-        where user_id=#{userId}
+        <where>
+            <if test="type == 1">
+                and jhy_id=#{userId}
+            </if>
+            <if test="type == 2" >
+                and user_id=#{userId}
+            </if>
+        </where>
         group by status
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1