From 923ffa97c9cba7012e93a1b76ae74c064a9473c0 Mon Sep 17 00:00:00 2001 From: 935090232@qq.com <ak473600000> Date: Fri, 05 Feb 2021 14:06:11 +0800 Subject: [PATCH] 取消订单,删除交易流水 --- zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 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..408922a 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> @@ -32,7 +36,7 @@ </resultMap> <select id="selectUserByZaqns" resultMap="com.matrix.system.common.dao.SysUsersDao.SysUsersMap" > - select su_id,su_name from sys_users where FIND_IN_SET(#{zans}, su_id) + select su_id,su_name from sys_users where FIND_IN_SET(su_id,#{zans}) </select> <!-- 定义SysFollowup 的简单map ,本map不添加其他的关联属性 --> @@ -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