From c80fa36ef5e9cfc48a368939e61c9e89a6b5ecc8 Mon Sep 17 00:00:00 2001
From: 姜友瑶 <935090232@qq.com>
Date: Mon, 13 Jun 2022 16:29:24 +0800
Subject: [PATCH] fix:排除删除会员方法
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml | 32 +++++++++++++++++++++++++-------
1 files changed, 25 insertions(+), 7 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 7ba3e47..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" />
@@ -40,7 +40,7 @@
</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>
@@ -354,7 +354,7 @@
left join sys_vip_info c on a.vip_id=c.id
<where>
and a.company_id=#{companyId}
- and (c.IS_DELETE is null or c.IS_DELETE = '')
+
<if test="shopId != null ">
and a.shop_id=#{shopId}
</if>
@@ -401,5 +401,23 @@
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