101 lines
4.9 KiB
XML
101 lines
4.9 KiB
XML
|
<?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.ruoyi.system.mapper.SysTreeDictMapper">
|
||
|
|
||
|
<resultMap type="SysTreeDict" id="SysTreeDictResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="dictText" column="dict_text" />
|
||
|
<result property="dictValue" column="dict_value" />
|
||
|
<result property="pid" column="pid" />
|
||
|
<result property="deptId" column="dept_id" />
|
||
|
<result property="dictSort" column="dict_sort" />
|
||
|
<result property="status" column="status" />
|
||
|
<result property="remark" column="remark" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectSysTreeDictVo">
|
||
|
select id, dict_text, dict_value, pid, dept_id, dict_sort, status, remark, update_by, update_time, create_by, create_time from sys_tree_dict
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectSysTreeDictList" parameterType="SysTreeDict" resultMap="SysTreeDictResult">
|
||
|
<include refid="selectSysTreeDictVo"/>
|
||
|
<where>
|
||
|
<if test="dictText != null and dictText != ''"> and dict_text = #{dictText}</if>
|
||
|
<if test="dictValue != null and dictValue != ''"> and dict_value = #{dictValue}</if>
|
||
|
<if test="pid != null "> and pid = #{pid}</if>
|
||
|
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||
|
<if test="dictSort != null "> and dict_sort = #{dictSort}</if>
|
||
|
<if test="status != null "> and status = #{status}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectSysTreeDictById" parameterType="Long" resultMap="SysTreeDictResult">
|
||
|
<include refid="selectSysTreeDictVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertSysTreeDict" parameterType="SysTreeDict" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into sys_tree_dict
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="dictText != null and dictText != ''">dict_text,</if>
|
||
|
<if test="dictValue != null and dictValue != ''">dict_value,</if>
|
||
|
<if test="pid != null">pid,</if>
|
||
|
<if test="deptId != null">dept_id,</if>
|
||
|
<if test="dictSort != null">dict_sort,</if>
|
||
|
<if test="status != null">status,</if>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
<if test="updateBy != null">update_by,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
<if test="createBy != null">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="dictText != null and dictText != ''">#{dictText},</if>
|
||
|
<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
|
||
|
<if test="pid != null">#{pid},</if>
|
||
|
<if test="deptId != null">#{deptId},</if>
|
||
|
<if test="dictSort != null">#{dictSort},</if>
|
||
|
<if test="status != null">#{status},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateSysTreeDict" parameterType="SysTreeDict">
|
||
|
update sys_tree_dict
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="dictText != null and dictText != ''">dict_text = #{dictText},</if>
|
||
|
<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
|
||
|
<if test="pid != null">pid = #{pid},</if>
|
||
|
<if test="deptId != null">dept_id = #{deptId},</if>
|
||
|
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||
|
<if test="status != null">status = #{status},</if>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteSysTreeDictById" parameterType="Long">
|
||
|
delete from sys_tree_dict where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteSysTreeDictByIds" parameterType="String">
|
||
|
delete from sys_tree_dict where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|