标签管理增删改查
This commit is contained in:
@@ -20,6 +20,8 @@ public interface HyPartnerLabelMapper {
|
||||
|
||||
HyPartnerLabelDO selectByPrimaryKey(Long id);
|
||||
|
||||
List<HyPartnerLabelDO> selectSelective(HyPartnerLabelDO labelDO);
|
||||
|
||||
int updateByPrimaryKeySelective(HyPartnerLabelDO record);
|
||||
|
||||
int updateByPrimaryKey(HyPartnerLabelDO record);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_label_group
|
||||
where id = #{id}
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
<select id="selectSelective" resultType="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
@@ -52,6 +53,7 @@
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
@@ -218,6 +220,7 @@
|
||||
<if test="labelGroupName != null and labelGroupName != ''">
|
||||
AND t1.label_group_name LIKE CONCAT('%', #{labelGroupName}, '%')
|
||||
</if>
|
||||
ORDER BY t1.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -2,17 +2,17 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyPartnerLabelMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerLabelDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="label_group_id" jdbcType="BIGINT" property="labelGroupId" />
|
||||
<result column="label_name" jdbcType="VARCHAR" property="labelName" />
|
||||
<result column="edit_user_id" jdbcType="VARCHAR" property="editUserId" />
|
||||
<result column="edit_date" jdbcType="TIMESTAMP" property="editDate" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<id column="id" property="id" />
|
||||
<result column="label_group_id" property="labelGroupId" />
|
||||
<result column="label_name" property="labelName" />
|
||||
<result column="edit_user_id" property="editUserId" />
|
||||
<result column="edit_date" property="editDate" />
|
||||
<result column="deleted" property="deleted" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="create_user_id" property="createUserId" />
|
||||
<result column="update_user_id" property="updateUserId" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, label_group_id, label_name, edit_user_id, edit_date, deleted, create_time, update_time,
|
||||
@@ -22,21 +22,58 @@
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_label
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
where deleted = 0
|
||||
and id = #{id}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSelective" resultType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from hy_partner_label
|
||||
where deleted = 0
|
||||
<if test="labelGroupId != null">
|
||||
and label_group_id = #{labelGroupId}
|
||||
</if>
|
||||
<if test="labelName != null and labelName != ''">
|
||||
and label_name = #{labelName}
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
and edit_user_id = #{editUserId}
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
and edit_date = #{editDate}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
and create_user_id = #{createUserId}
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
and update_user_id = #{updateUserId}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
and remark = #{remark}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_partner_label
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
insert into hy_partner_label (id, label_group_id, label_name,
|
||||
edit_user_id, edit_date, deleted,
|
||||
create_time, update_time, create_user_id,
|
||||
update_user_id, remark)
|
||||
values (#{id,jdbcType=BIGINT}, #{labelGroupId,jdbcType=BIGINT}, #{labelName,jdbcType=VARCHAR},
|
||||
#{editUserId,jdbcType=VARCHAR}, #{editDate,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT},
|
||||
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=VARCHAR},
|
||||
#{updateUserId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
|
||||
values (#{id}, #{labelGroupId}, #{labelName},
|
||||
#{editUserId}, #{editDate}, #{deleted},
|
||||
#{createTime}, #{updateTime}, #{createUserId},
|
||||
#{updateUserId}, #{remark})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
insert into hy_partner_label
|
||||
@@ -77,37 +114,37 @@
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
#{id},
|
||||
</if>
|
||||
<if test="labelGroupId != null">
|
||||
#{labelGroupId,jdbcType=BIGINT},
|
||||
#{labelGroupId},
|
||||
</if>
|
||||
<if test="labelName != null">
|
||||
#{labelName,jdbcType=VARCHAR},
|
||||
#{labelName},
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
#{editUserId,jdbcType=VARCHAR},
|
||||
#{editUserId},
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
#{editDate,jdbcType=TIMESTAMP},
|
||||
#{editDate},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
#{deleted,jdbcType=BIT},
|
||||
#{deleted},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
#{createUserId,jdbcType=VARCHAR},
|
||||
#{createUserId},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId,jdbcType=VARCHAR},
|
||||
#{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -115,51 +152,52 @@
|
||||
update hy_partner_label
|
||||
<set>
|
||||
<if test="labelGroupId != null">
|
||||
label_group_id = #{labelGroupId,jdbcType=BIGINT},
|
||||
label_group_id = #{labelGroupId},
|
||||
</if>
|
||||
<if test="labelName != null">
|
||||
label_name = #{labelName,jdbcType=VARCHAR},
|
||||
<if test="labelName != null and labelName != ''">
|
||||
label_name = #{labelName},
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
edit_user_id = #{editUserId,jdbcType=VARCHAR},
|
||||
edit_user_id = #{editUserId},
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
edit_date = #{editDate,jdbcType=TIMESTAMP},
|
||||
edit_date = #{editDate},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||
create_user_id = #{createUserId},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
remark = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
where deleted = 0
|
||||
and id = #{id}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
update hy_partner_label
|
||||
set label_group_id = #{labelGroupId,jdbcType=BIGINT},
|
||||
label_name = #{labelName,jdbcType=VARCHAR},
|
||||
edit_user_id = #{editUserId,jdbcType=VARCHAR},
|
||||
edit_date = #{editDate,jdbcType=TIMESTAMP},
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
set label_group_id = #{labelGroupId},
|
||||
label_name = #{labelName},
|
||||
edit_user_id = #{editUserId},
|
||||
edit_date = #{editDate},
|
||||
deleted = #{deleted},
|
||||
create_time = #{createTime},
|
||||
update_time = #{updateTime},
|
||||
create_user_id = #{createUserId},
|
||||
update_user_id = #{updateUserId},
|
||||
remark = #{remark}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getLabelList" resultType="com.cool.store.vo.LabelListVo">
|
||||
@@ -174,6 +212,7 @@
|
||||
<if test="labelGroupId != null">
|
||||
AND t2.id = #{labelGroupId}
|
||||
</if>
|
||||
ORDER BY t1.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="whetherGroupInUse" resultType="java.lang.Boolean">
|
||||
|
||||
Reference in New Issue
Block a user