From c41e8d372cdabbe1fd5973c9322e38a40bfa1a39 Mon Sep 17 00:00:00 2001
From: 姜友瑶 <935090232@qq.com>
Date: Thu, 05 May 2022 15:50:07 +0800
Subject: [PATCH] Merge branch 'developer' into alpha

---
 zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 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 b982691..51b8e0d 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
@@ -2,9 +2,9 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
-<mapper namespace="com.matrix.system.hive.dao.SysFollowupDao" >
+<mapper namespace="com.matrix.beauty.followup.dao.SysFollowupDao" >
 	<!-- 定义SysFollowup 的复杂关联map -->
-	<resultMap type="com.matrix.system.hive.bean.SysFollowup" id="SysFollowupMap">
+	<resultMap type="com.matrix.beauty.followup.entry.SysFollowup" id="SysFollowupMap">
 		<id property="id" column="id" />
 		<result property="createBy" column="create_by" />
 		<result property="createTime" column="create_time" />
@@ -36,11 +36,11 @@
 	</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不添加其他的关联属性 -->
-	<resultMap type="com.matrix.system.hive.bean.SysFollowup" id="SysFollowupSimpleMap">
+	<resultMap type="com.matrix.beauty.followup.entry.SysFollowup" id="SysFollowupSimpleMap">
 		<id property="id" column="id" />
 		<result property="createBy" column="create_by" />
 		<result property="createTime" column="create_time" />
@@ -142,9 +142,9 @@
 		</if>
 		 
 	</sql>
-	
+
 	<!--  插入方法   -->
-	<insert id="insert" parameterType="com.matrix.system.hive.bean.SysFollowup"
+	<insert id="insert" parameterType="com.matrix.beauty.followup.entry.SysFollowup"
 		useGeneratedKeys="true" keyProperty="item.id">
 		INSERT INTO sys_followup (
 			 <include refid="columns"></include>
@@ -275,7 +275,7 @@
 	</delete>
 	
 	<!-- 根据对象删除-->
-	<delete id="deleteByModel" parameterType="com.matrix.system.hive.bean.SysFollowup">
+	<delete id="deleteByModel" parameterType="com.matrix.beauty.followup.entry.SysFollowup">
 		DELETE FROM sys_followup
 		<where>
 		<include refid="where_sql" ></include>
@@ -395,11 +395,29 @@
 		</where>
 
 
-
+		order by a.create_time desc
 
 
 	  	limit ${offset},${limit}
 	</select>
 
+<select id="findVipFollowuByPage" resultMap="SysFollowupMap">
+		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 a.company_id=#{companyId}
+			and (visible=1 or ( visible!=1 and a.staff_id=#{selfStaff}))
+			<if test="vipId!=null">
+				and	a.vip_id = #{vipId}
+			</if>
+		</where>
+		order by a.create_time desc
+	  	limit ${offset},${limit}
+	</select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1