You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
4.3 KiB
XML
111 lines
4.3 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.glxp.api.dao.auth.SysDictDataMapper">
|
|
|
|
<resultMap type="com.glxp.api.entity.auth.SysDictData" id="SysDictDataResult">
|
|
<id property="dictCode" column="dict_code"/>
|
|
<result property="dictSort" column="dict_sort"/>
|
|
<result property="dictLabel" column="dict_label"/>
|
|
<result property="dictValue" column="dict_value"/>
|
|
<result property="dictType" column="dict_type"/>
|
|
<result property="cssClass" column="css_class"/>
|
|
<result property="listClass" column="list_class"/>
|
|
<result property="isDefault" column="is_default"/>
|
|
<result property="status" column="status"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectDictDataList" parameterType="com.glxp.api.req.auth.SysDictDataRequest"
|
|
resultMap="SysDictDataResult">
|
|
SELECT *
|
|
FROM sys_dict_data
|
|
<where>
|
|
<if test="dictType != null ">
|
|
and dict_type = #{dictType}
|
|
</if>
|
|
<if test="status != null ">
|
|
and status = #{status}
|
|
</if>
|
|
<if test="dictLabel != null ">
|
|
and dict_label = #{dictLabel}
|
|
</if>
|
|
<if test="dictValue != null ">
|
|
and dict_value = #{dictValue}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectById" parameterType="Map"
|
|
resultMap="SysDictDataResult">
|
|
SELECT *
|
|
FROM sys_dict_data
|
|
WHERE dict_code = #{dictCode}
|
|
</select>
|
|
<delete id="deleteById" parameterType="java.lang.Long">
|
|
delete
|
|
from sys_dict_data
|
|
where dict_code = #{dictCode}
|
|
</delete>
|
|
|
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true"
|
|
parameterType="com.glxp.api.entity.auth.SysDictData">
|
|
INSERT INTO sys_dict_data(`dict_code`, `dict_sort`, dict_label, dict_value
|
|
, dict_type, css_class, list_class, is_default, status, remark,
|
|
create_by, create_time, update_by)
|
|
values (#{dictCode},
|
|
#{dictSort}, #{dictLabel}, #{dictValue}, #{dictType}, #{cssClass}, #{listClass}
|
|
, #{isDefault}, #{status}, #{remark}, #{createBy}, #{createTime}, #{updateBy})
|
|
</insert>
|
|
|
|
|
|
<update id="updateById" parameterType="com.glxp.api.entity.auth.SysRole">
|
|
UPDATE sys_dict_data
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<if test="dictCode != null">`dict_code`=#{dictCode},</if>
|
|
<if test="dictSort != null">`dict_sort`=#{dictSort},</if>
|
|
<if test="dictLabel != null">dict_label=#{dictLabel},</if>
|
|
<if test="dictValue != null">`dict_value`=#{dictValue},</if>
|
|
<if test="dictType != null">dict_type=#{dictType},</if>
|
|
<if test="cssClass != null">`css_class`=#{cssClass},</if>
|
|
<if test="listClass != null">`list_class`=#{listClass},</if>
|
|
<if test="isDefault != null">is_default=#{isDefault},</if>
|
|
<if test="status != null">status=#{status},</if>
|
|
<if test="remark != null">remark=#{remark},</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>
|
|
</trim>
|
|
WHERE dict_code=#{dictCode}
|
|
</update>
|
|
|
|
|
|
<select id="exists" parameterType="com.glxp.api.req.auth.SysDictDataRequest"
|
|
resultMap="SysDictDataResult">
|
|
SELECT *
|
|
FROM sys_dict_data
|
|
<where>
|
|
<if test="dictType != null ">
|
|
and dict_type = #{dictType}
|
|
</if>
|
|
<if test="status != null ">
|
|
and status = #{status}
|
|
</if>
|
|
<if test="dictLabel != null ">
|
|
and dict_label = #{dictLabel}
|
|
</if>
|
|
<if test="dictValue != null ">
|
|
and dict_value = #{dictValue}
|
|
</if>
|
|
</where>
|
|
limit 1
|
|
</select>
|
|
|
|
</mapper>
|