feat: 新增标签分类管理功能。
This commit is contained in:
@@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="categoryKey" column="category_key" />
|
||||
<result property="categoryTitle" column="category_title" />
|
||||
<result property="sortOrder" column="sort_order" />
|
||||
<result property="superCategoryId" column="super_category_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
@@ -23,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
wtc.category_key,
|
||||
wtc.category_title,
|
||||
wtc.sort_order,
|
||||
wtc.super_category_id,
|
||||
wtc.create_by,
|
||||
wtc.create_time,
|
||||
wtc.update_by,
|
||||
@@ -38,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
wtc.del_flag='0'
|
||||
<if test="categoryKey != null and categoryKey != ''"> and wtc.category_key like '%'|| #{categoryKey}||'%'</if>
|
||||
<if test="categoryTitle != null and categoryTitle != ''"> and wtc.category_title like '%'|| #{categoryTitle}||'%'</if>
|
||||
<if test="superCategoryId != null"> and wtc.super_category_id = #{superCategoryId}</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
@@ -56,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="categoryKey != null and categoryKey != ''">category_key,</if>
|
||||
<if test="categoryTitle != null and categoryTitle != ''">category_title,</if>
|
||||
<if test="sortOrder != null">sort_order,</if>
|
||||
<if test="superCategoryId != null">super_category_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
@@ -68,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="categoryKey != null and categoryKey != ''">#{categoryKey},</if>
|
||||
<if test="categoryTitle != null and categoryTitle != ''">#{categoryTitle},</if>
|
||||
<if test="sortOrder != null">#{sortOrder},</if>
|
||||
<if test="superCategoryId != null">#{superCategoryId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
@@ -83,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="categoryKey != null and categoryKey != ''">category_key = #{categoryKey},</if>
|
||||
<if test="categoryTitle != null and categoryTitle != ''">category_title = #{categoryTitle},</if>
|
||||
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
||||
<if test="superCategoryId != null">super_category_id = #{superCategoryId},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.intc.invest.mapper.WorkToolSuperCategoryMapper">
|
||||
|
||||
<resultMap type="WorkToolSuperCategoryVo" id="WorkToolSuperCategoryResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="superCategoryKey" column="super_category_key" />
|
||||
<result property="superCategoryTitle" column="super_category_title" />
|
||||
<result property="sortOrder" column="sort_order" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectWorkToolSuperCategoryVo">
|
||||
select a.id, a.super_category_key, a.super_category_title, a.sort_order, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time, a.remark from work_tool_super_category a
|
||||
</sql>
|
||||
|
||||
<select id="selectWorkToolSuperCategoryList" parameterType="WorkToolSuperCategoryDto" resultMap="WorkToolSuperCategoryResult">
|
||||
<include refid="selectWorkToolSuperCategoryVo"/>
|
||||
<where>
|
||||
a.del_flag='0'
|
||||
<if test="superCategoryKey != null and superCategoryKey != ''"> and a.super_category_key like '%'|| #{superCategoryKey}||'%'</if>
|
||||
<if test="superCategoryTitle != null and superCategoryTitle != ''"> and a.super_category_title like '%'|| #{superCategoryTitle}||'%'</if>
|
||||
</where>
|
||||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
order by a.sort_order asc, a.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectWorkToolSuperCategoryById" parameterType="Long" resultMap="WorkToolSuperCategoryResult">
|
||||
<include refid="selectWorkToolSuperCategoryVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertWorkToolSuperCategory" parameterType="WorkToolSuperCategory">
|
||||
insert into work_tool_super_category
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="superCategoryKey != null and superCategoryKey != ''">super_category_key,</if>
|
||||
<if test="superCategoryTitle != null and superCategoryTitle != ''">super_category_title,</if>
|
||||
<if test="sortOrder != null">sort_order,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="superCategoryKey != null and superCategoryKey != ''">#{superCategoryKey},</if>
|
||||
<if test="superCategoryTitle != null and superCategoryTitle != ''">#{superCategoryTitle},</if>
|
||||
<if test="sortOrder != null">#{sortOrder},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateWorkToolSuperCategory" parameterType="WorkToolSuperCategory">
|
||||
update work_tool_super_category
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="superCategoryKey != null and superCategoryKey != ''">super_category_key = #{superCategoryKey},</if>
|
||||
<if test="superCategoryTitle != null and superCategoryTitle != ''">super_category_title = #{superCategoryTitle},</if>
|
||||
<if test="sortOrder != null">sort_order = #{sortOrder},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteWorkToolSuperCategoryById" parameterType="Long">
|
||||
delete from work_tool_super_category where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteWorkToolSuperCategoryByIds" parameterType="String">
|
||||
delete from work_tool_super_category where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<update id="removeWorkToolSuperCategoryById" parameterType="Long">
|
||||
update work_tool_super_category set del_flag='2' where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="removeWorkToolSuperCategoryByIds" parameterType="String">
|
||||
update work_tool_super_category set del_flag='2' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user