From e971ea090aa1f320f3c3f78c3a2a8d50f16dd4d0 Mon Sep 17 00:00:00 2001
From: 935090232@qq.com <ak473600000>
Date: Fri, 15 Jan 2021 23:38:19 +0800
Subject: [PATCH] 小程序预约接口修改

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml |   32 +++++++++++++++++++++-----------
 1 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
index 6d5c625..b396bbe 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
@@ -22,6 +22,10 @@
 			<result property="orderAbstract" column="order_abstract" />
 			<result property="zans" column="zans" />
 
+			<result property="staffPhoto" column="staffPhoto" />
+			<result property="staffName" column="staffName" />
+			<result property="vipName" column="vipName" />
+
 			<collection property="albums" column="{sourceId=id}" select="com.matrix.system.hive.dao.SysVipAlbumDao.selectBySourceId"  />
 
 			<collection property="followupComments" column="{follId=id}"  select="com.matrix.system.hive.dao.SysFollowupCommentDao.selectByfollId" ></collection>
@@ -341,32 +345,38 @@
 
 
 	<select id="selectByAppDto" resultMap="SysFollowupMap">
-		select * from sys_followup
+		select a.*,
+		 b.su_photo as staffPhoto,
+		 b.su_name as staffName,
+		 c.vip_name as vipName
+		 from sys_followup  a
+		 left join  sys_users b on a.staff_id= b.su_id
+		 left join  sys_vip_info c on a.vip_id=c.id
 		<where>
-			and company_id=#{companyId}
+			and a.company_id=#{companyId}
 
 			<if test="shopId != null ">
-				and shop_id=#{shopId}
+				and a.shop_id=#{shopId}
 			</if>
 			<if test="queryType == 1 ">
-				and (visible=1 or ( visible!=1 and staff_id=#{selfStaff}))
+				and (visible=1 or ( visible!=1 and a.staff_id=#{selfStaff}))
 			</if>
 			<if test="queryType == 2 ">
-				and staff_id=#{selfStaff}
+				and a.staff_id=#{selfStaff}
 			</if>
 			<if test="queryType == 3 ">
-				and( visible=1 and staff_id!=#{selfStaff})
+				and( visible=1 and a.staff_id!=#{selfStaff})
 			</if>
 
 			<if test="startTime != null ">
-				and create_time <![CDATA[ >= ]]> #{startTime}
+				and a.create_time <![CDATA[ >= ]]> #{startTime}
 			</if>
 			<if test="endTime != null ">
-				and create_time <![CDATA[ <= ]]> #{endTime}
+				and a.create_time <![CDATA[ <= ]]> #{endTime}
 			</if>
 
 			<if test="vipIds!=null and vipIds.size()!=0">
-				and	vip_id in
+				and	a.vip_id in
 				<foreach collection="vipIds" index="index" item="item" open="("
 						 separator="," close=")">
 					#{item}
@@ -374,7 +384,7 @@
 			</if>
 
 			<if test="staffIds!=null and staffIds.size()!=0">
-				and	staff_id in
+				and	a.staff_id in
 				<foreach collection="staffIds" index="index" item="item" open="("
 						 separator="," close=")">
 					#{item}
@@ -385,7 +395,7 @@
 		</where>
 
 
-
+		order by a.create_time desc
 
 
 	  	limit ${offset},${limit}

--
Gitblit v1.9.1