From 6766d8988e304577fb660991659688006f41493e Mon Sep 17 00:00:00 2001
From: 姜友瑶 <935090232@qq.com>
Date: Sat, 02 Jul 2022 16:13:40 +0800
Subject: [PATCH] 肽妍切换数据库
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml | 28 +++++++++++++++++++++++++---
1 files changed, 25 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 6b6dfc9..c7df75e 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
@@ -14,7 +14,7 @@
<result property="orderNo" column="ORDER_NO"/>
<result property="activity" column="ACTIVITY"/>
<result property="total" column="TOTAL"/>
- <result property="cashierName" column="cashierName"/>
+
<result property="statu" column="STATU"/>
<result property="zkTotal" column="ZK_TOTAL"/>
@@ -31,7 +31,7 @@
<result property="arrears" column="arrears"/>
<result property="payTime" column="pay_time"/>
<result property="cashierId" column="cashier_id"/>
-
+ <result property="cashierName" column="cashierName"/>
<!-- 扩展字段 -->
<result property="shopName" column="SHOP_NAME"/>
<result property="shopShortName" column="SHOP_SHORT_NAME"/>
@@ -347,7 +347,7 @@
<select id="selectById" resultMap="SysOrderMap">
select
a.*,
- c.su_name as STAFF_NAME,
+ c.su_name as STAFF_NAME, e.su_name as cashierName,
d.SHOP_NAME,
d.shop_short_name,
b.PHONE,
@@ -355,10 +355,32 @@
from sys_order a
LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
left JOIN sys_users c on c.su_id=a.STAFF_ID
+ left JOIN sys_users e on e.su_id=a.cashier_id
left JOIN sys_shop_info d on d.ID=a.SHOP_ID
where a.id=#{id}
</select>
+ <!-- 根据id查询 -->
+ <select id="selectByIds" resultMap="SysOrderMap">
+ select
+ a.*,
+ c.su_name as STAFF_NAME, e.su_name as cashierName,
+ d.SHOP_NAME,
+ d.shop_short_name,
+ b.PHONE,
+ b.VIP_NAME
+ from sys_order a
+ LEFT JOIN sys_vip_info b on b.ID=a.VIP_ID
+ left JOIN sys_users c on c.su_id=a.STAFF_ID
+ left JOIN sys_users e on e.su_id=a.cashier_id
+ left JOIN sys_shop_info d on d.ID=a.SHOP_ID
+ where a.id in
+ <foreach collection="list" index="index" item="item" open="("
+ separator="," close=")">
+ #{item}
+ </foreach>
+ </select>
+
<!-- 根据对象查询 -->
<select id="selectByModel" resultMap="SysOrderMap">
--
Gitblit v1.9.1