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/SysVipInfoDao.xml | 85 ++++++++++++++++++------------------------
1 files changed, 36 insertions(+), 49 deletions(-)
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
index 2ce9dbc..e31f02b 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
@@ -144,7 +144,7 @@
COMMISSION_ALL,IN_DATE,STAFF_ID,SHOP_ID,IS_DELETE,REMARK,PASSWORD,
EMAIL,CREATE_TIME,UUID,BALANCE,blood,sfCard,link,marry,vocation,handleTime from
sys_vip_info
- WHERE company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
+ WHERE company_id=#{companyId} and IS_DELETE = 'N'
and (STAFF_ID = #{staffId} or BEATUY_ID = #{staffId})
AND datediff(date_add(concat(
date_format(BIRTHDAY1, "%Y"),
@@ -170,7 +170,7 @@
select count(*) from
sys_vip_info
WHERE
- company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
+ company_id=#{companyId} and IS_DELETE = 'N'
AND (STAFF_ID = #{staffId} or BEATUY_ID = #{staffId})
AND datediff(date_add(concat(
date_format(BIRTHDAY1, "%Y"),
@@ -189,7 +189,7 @@
sys_vip_info a
LEFT JOIN service_record b ON a.ID
= b.vip_id
- WHERE company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
+ WHERE company_id=#{companyId} and a.IS_DELETE = 'N'
and (a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.follow_time BETWEEN curdate()
AND
@@ -212,7 +212,8 @@
LEFT JOIN service_record b ON a.ID
= b.vip_id
WHERE
- company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
+ company_id=#{companyId}
+ and a.IS_DELETE = 'N'
and
(a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.follow_time BETWEEN curdate()
@@ -226,7 +227,8 @@
sys_vip_info a
LEFT JOIN sys_proj_services b ON a.ID = b.VIP_ID
WHERE
- company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
+ company_id=#{companyId}
+ and a.IS_DELETE = 'N'
and
(a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.YY_TIME BETWEEN curdate()
@@ -250,7 +252,8 @@
LEFT JOIN sys_proj_services b ON a.ID = b.VIP_ID
WHERE
- company_id=#{companyId} and (a.IS_DELETE is null or a.IS_DELETE = '')
+ company_id=#{companyId}
+ and a.IS_DELETE = 'N'
and
(a.STAFF_ID = #{staffId} or a.BEATUY_ID = #{staffId})
AND b.YY_TIME BETWEEN curdate()
@@ -437,9 +440,6 @@
<if test="shopId != null and shopId !='' ">
SHOP_ID = #{shopId},
</if>
- <if test="isDelete != null and isDelete !='' ">
- IS_DELETE = #{isDelete},
- </if>
<if test="passWord != null and passWord !='' ">
PASSWORD = #{passWord},
</if>
@@ -569,19 +569,12 @@
</delete>
<update id="deleteLogicByIds" parameterType="java.util.List">
- UPDATE sys_vip_info set IS_DELETE = '已删除' where ID in
+ UPDATE sys_vip_info set IS_DELETE = 'Y' where ID in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
</foreach>
</update>
-
- <!-- 根据id删除 -->
- <delete id="deleteById">
- DELETE FROM sys_vip_info
- where ID=#{id}
- </delete>
-
<!-- 分页查询 -->
@@ -624,7 +617,7 @@
<select id="findByOpenId" resultMap="SysVipInfoMap">
select *
- from sys_vip_info where openid=#{openId} and (IS_DELETE is null or IS_DELETE = '')
+ from sys_vip_info where openid=#{openId} and IS_DELETE = 'N'
</select>
<!-- 根据手机和密码查询 -->
@@ -636,7 +629,7 @@
<!-- 判断是否为唯一 -->
<select id="selectTotalByField" resultType="java.lang.Integer">
select count(*) from
- sys_vip_info where ${field} = #{value} and (IS_DELETE is null or IS_DELETE = '')
+ sys_vip_info where ${field} = #{value} and IS_DELETE = 'N'
</select>
<!-- 根据对象查询 -->
@@ -716,7 +709,7 @@
COMMISSION_ALL,IN_DATE,STAFF_ID,SHOP_ID,IS_DELETE,REMARK,PASSWORD,
EMAIL,CREATE_TIME,UUID,BALANCE
from sys_vip_info where
- company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
+ company_id=#{companyId} and IS_DELETE = 'N'
and PHONE like concat('%',#{keyWord},'%') limit 0,10
</select>
@@ -729,7 +722,7 @@
COMMISSION_ALL,IN_DATE,STAFF_ID,SHOP_ID,IS_DELETE,REMARK,PASSWORD,
EMAIL,CREATE_TIME,UUID,BALANCE,blood,sfCard,link,marry,vocation
from sys_vip_info
- where company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
+ where company_id=#{companyId} and IS_DELETE = 'N'
and (instr(PHONE,#{keyWord})
or instr(VIP_NAME ,#{keyWord})
or instr(zjm ,#{keyWord})
@@ -755,7 +748,7 @@
<include refid="select"></include>
<include refid="from"></include>
where 1=1
- and (a.IS_DELETE is null or a.IS_DELETE = '')
+ and a.IS_DELETE = 'N'
and
(a.VIP_NO =#{key} or
a.VIP_NAME =#{key} or
@@ -771,7 +764,7 @@
<sql id="whereVo">
<where>
- and (a.IS_DELETE is null or a.IS_DELETE = '')
+ a.IS_DELETE = 'N'
<if test="record!=null">
<if test="record.keyWord != null and record.keyWord !='' ">
and (a.VIP_NO like CONCAT('%',#{record.keyWord},'%') or
@@ -802,7 +795,7 @@
</sql>
<sql id="where">
- where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where 1=1 and a.IS_DELETE = 'N'
<if test="record!=null">
<if test="record.id != null and record.id !='' ">
and a.ID = #{record.id}
@@ -859,9 +852,6 @@
</if>
<if test="record.shopId != null and record.shopId !='' ">
and a.SHOP_ID = #{record.shopId}
- </if>
- <if test="record.isDelete != null and record.isDelete !='' ">
- and a.IS_DELETE = #{record.isDelete}
</if>
<if test="record.passWord != null and record.passWord !='' ">
and a.PASSWORD = #{record.passWord}
@@ -929,7 +919,7 @@
<sql id="where1">
- where 1=1
+ where a.IS_DELETE = 'N'
<if test="record!=null">
<if test="record.id != null and record.id !='' ">
and a.ID = #{record.id}
@@ -991,9 +981,6 @@
</if>
<if test="record.shopId != null and record.shopId !='' ">
and a.SHOP_ID = #{record.shopId}
- </if>
- <if test="record.isDelete != null and record.isDelete !='' ">
- and a.IS_DELETE = #{record.isDelete}
</if>
<if test="record.passWord != null and record.passWord !='' ">
and a.PASSWORD = #{record.passWord}
@@ -1082,7 +1069,7 @@
(select a.id from sys_vip_info a
- where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where 1=1 and a.IS_DELETE = 'N'
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1095,7 +1082,7 @@
f.vip_name as name
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
+ where 1=1 and d.IS_DELETE = 'N'
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>
@@ -1123,7 +1110,7 @@
(select a.id from sys_vip_info a
- where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where 1=1 and a.IS_DELETE = 'N')
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1136,7 +1123,7 @@
f.vip_name as name
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
+ where 1=1 and d.IS_DELETE = 'N'
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>)k
@@ -1149,7 +1136,7 @@
f.vip_name as name
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
+ where 1=1 and d.IS_DELETE = 'N'
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>
@@ -1171,7 +1158,7 @@
count(*)
from sys_vip_info d
LEFT JOIN sys_vip_info f on d.parent_id = f.id
- where 1=1 and (d.IS_DELETE is null or d.IS_DELETE = '')
+ where 1=1 and d.IS_DELETE = 'N'
<if test="record.parentId != null and record.parentId !='' ">
and d.parent_id = #{record.parentId}
</if>
@@ -1187,7 +1174,7 @@
(select a.id from sys_vip_info a
- where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where 1=1 and a.IS_DELETE = 'N'
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1213,7 +1200,7 @@
(select a.id from sys_vip_info a
- where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where a.IS_DELETE = 'N')
<if test="record.parentId != null and record.parentId !='' ">
and a.parent_id = #{record.parentId}
</if>
@@ -1223,13 +1210,13 @@
<select id="selectByPhone" resultMap="SysVipInfoMapSimple">
- select * from sys_vip_info where PHONE = #{phone} and company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
+ select * from sys_vip_info where PHONE = #{phone} and company_id=#{companyId} and IS_DELETE = 'N'
</select>
<select id="selectVipTelphoneByIds" resultType="java.lang.String">
select phone from sys_vip_info
- where phone is not null and (IS_DELETE is null or IS_DELETE = '') and id in
+ where phone is not null and IS_DELETE = 'N' and id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
@@ -1239,18 +1226,18 @@
<select id="selectAllVipPhone" resultType="java.lang.String">
select phone from sys_vip_info
where
- company_id=#{companyId} and (IS_DELETE is null or IS_DELETE = '')
+ company_id=#{companyId} and IS_DELETE = 'N'
and phone is not null
</select>
<select id="selectVipPhoneWithShop" resultType="java.lang.String">
select phone from sys_vip_info
- where phone is not null and shop_id=#{shopId} and (IS_DELETE is null or IS_DELETE = '')
+ where phone is not null and shop_id=#{shopId} and IS_DELETE = 'N'
</select>
<select id="selectOldUserByTelphone" resultMap="SysVipInfoMap">
- select * from sys_vip_info where phone=#{telphone} and is_deal=1 and (IS_DELETE is null or IS_DELETE = '')
+ select * from sys_vip_info where phone=#{telphone} and is_deal=1 and IS_DELETE = 'N'
</select>
@@ -1369,7 +1356,7 @@
</insert>
<select id="selectVipInfoByVipNo" resultMap="SysVipInfoMapSimple">
- select * from sys_vip_info where company_id=#{companyId} and vip_no=#{vipNo} and (IS_DELETE is null or IS_DELETE = '')
+ select * from sys_vip_info where company_id=#{companyId} and vip_no=#{vipNo} and IS_DELETE = 'N'
</select>
<select id="selectVipAddressBookByList" resultType="com.matrix.system.app.vo.VipInfoListVo">
@@ -1426,7 +1413,7 @@
</if>
left join sys_shop_info g on a.shop_id = g.id
left join sys_vip_level h on a.level_id=h.id
- where 1=1 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where 1=1 and a.IS_DELETE = 'N'
<if test="record.queryKey != null and record.queryKey != ''">
and (instr(PHONE,#{record.queryKey})
or instr(VIP_NAME ,#{record.queryKey})
@@ -1483,7 +1470,7 @@
left join money_card_use b on a.ID = b.vip_id and b.status='有效'
left join sys_vip_level c on a.LEVEL_ID = c.ID
left join sys_shop_info e on a.SHOP_ID=e.ID
- where a.ID=#{id} and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where a.ID=#{id}
</select>
@@ -1500,7 +1487,7 @@
inner join sys_order b on a.ID=b.VIP_ID
inner join sys_shop_info c on a.SHOP_ID=c.ID
left join sys_users d on a.STAFF_ID=d.su_id
- where b.STATU='欠款' and b.arrears!=0 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where b.STATU='欠款' and b.arrears!=0 and a.IS_DELETE = 'N'
<if test="record.companyId!=null">
and a.company_id=#{record.companyId}
</if>
@@ -1537,7 +1524,7 @@
inner join sys_order b on a.ID=b.VIP_ID
inner join sys_shop_info c on a.SHOP_ID=c.ID
left join sys_users d on a.STAFF_ID=d.su_id
- where b.STATU='欠款' and b.arrears!=0 and (a.IS_DELETE is null or a.IS_DELETE = '')
+ where b.STATU='欠款' and b.arrears!=0 and a.IS_DELETE = 'N'
<if test="record.companyId!=null">
and a.company_id=#{record.companyId}
</if>
--
Gitblit v1.9.1