From 10fe021916da34ecab032cf1c0ed26c4947f522a Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Thu, 11 Mar 2021 18:12:35 +0800
Subject: [PATCH] 新增申请成为分销员接口4

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
index bd84983..1e64c24 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -18,6 +18,7 @@
         <result property="statu" column="STATU"/>
         <result property="zkTotal" column="ZK_TOTAL"/>
         <result property="shopId" column="SHOP_ID"/>
+        <result property="companyId" column="company_id"/>
         <result property="vipName" column="VIP_NAME"/>
         <result property="vipNo" column="VIP_NO"/>
         <result property="staffName" column="STAFF_NAME"/>
@@ -89,7 +90,7 @@
     <!-- 更新订单时间 -->
     <update id="updateOrderTime">
 		UPDATE sys_order
-		set  ORDER_TIME = #{orderTime}
+		set  pay_time = #{payTime}
 		WHERE id=#{id}
 	 </update>
 
@@ -469,13 +470,14 @@
 
     <select id="selectVipOrderInfoTotal" resultType="com.matrix.system.hive.bean.SysOrder">
         select
-            sum(ZK_TOTAL) zkTotal,
+            sum(amount) zkTotal,
             count(1) times,
             MAX(pay_time) payTime,
             GROUP_CONCAT(DISTINCT t2.shop_short_name) shopName
         from sys_order t1
+        left join sys_order_flow b on t1.id=b.ORDER_ID and pay_method!='储值卡'
         left join sys_shop_info t2 on t1.SHOP_ID=t2.ID
-        where VIP_ID=#{vipId} and STATU='已付款';
+        where t1.VIP_ID=#{vipId} and STATU='已付款';
     </select>
 
     <select id="selectApiOrderListInPage" resultType="com.matrix.system.app.vo.OrderDetailVo">
@@ -504,6 +506,9 @@
             <if test="record.shopId != null">
                 and a.shop_id=#{record.shopId}
             </if>
+            <if test="record.companyId != null">
+                and a.company_id=#{record.companyId}
+            </if>
         </where>
         <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
             order by a.order_time desc
@@ -530,6 +535,9 @@
             <if test="record.shopId != null">
                 and a.shop_id=#{record.shopId}
             </if>
+            <if test="record.companyId != null">
+                and a.company_id=#{record.companyId}
+            </if>
         </where>
     </select>
 

--
Gitblit v1.9.1