From eb00ab72be1c51848ab9355717d4db64c7f8b566 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 22 Jan 2021 12:44:43 +0800
Subject: [PATCH] modify
---
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 50 insertions(+), 8 deletions(-)
diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml
index aa566df..059acf2 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysVipLabelDao.xml
@@ -9,16 +9,37 @@
create_time,
create_by,
id,
- vip_id,
- label
+ label,
+ shop_id,
+ company_id,
+ is_all,
+ user_id,
+ color
) values (
#{createTime},
#{createBy},
#{id},
- #{vipId},
- #{label}
+ #{label},
+ #{shopId},
+ #{companyId},
+ #{isAll},
+ #{userId},
+ #{color}
)
</insert>
+
+ <update id="update">
+ update sys_vip_label
+ <set>
+ <if test="label != null and label !='' ">
+ label = #{label},
+ </if>
+ <if test="color != null and color !='' ">
+ color = #{color},
+ </if>
+ </set>
+ WHERE ID=#{id}
+ </update>
<delete id="deleteById">
delete from sys_vip_label
@@ -33,15 +54,36 @@
</select>
<select id="selectByModel" resultType="com.matrix.system.hive.bean.SysVipLabel">
- select * from sys_vip_label
+ select
+ create_time createTime,
+ create_by createBy,
+ id,
+ label,
+ shop_id shopId,
+ company_id companyId,
+ is_all isAll,
+ user_id userId,
+ color
+ from sys_vip_label
where 1=1
<if test="record!=null">
<if test="record.label!=null and record.label!=''">
- and label=#{record.label}
+ and label like CONCAT('%', CONCAT(#{record.label},'%'))
</if>
- <if test="record.vipId!=null">
- and vip_id=#{record.vipId}
+ <if test="record.isAll!=null and record.isAll!=0">
+ and is_all=#{record.isAll}
+ </if>
+ <if test="record.userId!=null and record.userId!=''">
+ and user_id=#{record.userId}
+ </if>
+ <if test="record.companyId!=null and record.companyId!=''">
+ and company_id=#{record.companyId}
</if>
</if>
</select>
+
+ <delete id="deleteByVipId">
+ delete from sys_vip_label
+ where vip_id=#{vipId}
+ </delete>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1