| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?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.middle.platform.system.biz.mapper.SysDictItemMapper">
- <resultMap id="BaseResultMap" type="com.middle.platform.system.biz.entity.SysDictItem">
- <!--@mbg.generated-->
- <!--@Table sys_dict_item-->
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="dict_id" jdbcType="BIGINT" property="dictId"/>
- <result column="value" jdbcType="VARCHAR" property="value"/>
- <result column="label" jdbcType="VARCHAR" property="label"/>
- <result column="type" jdbcType="VARCHAR" property="type"/>
- <result column="desc" jdbcType="VARCHAR" property="desc"/>
- <result column="sort" jdbcType="INTEGER" property="sort"/>
- <result column="create_by" jdbcType="BIGINT" property="createBy"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime"/>
- <result column="del_flag" jdbcType="BOOLEAN" property="delFlag"/>
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id,
- dict_id,
- `value`,
- `label`,
- `type`,
- `desc`,
- sort,
- create_by,
- create_time,
- update_by,
- update_time,
- delete_time,
- del_flag
- </sql>
- <select id="queryOne" resultType="com.middle.platform.system.api.pojo.DictCache">
- select *
- from sys_dict_item sdi
- <where>
- <if test="dictType != null and dictType != ''">
- and sdi.type = #{dictType,jdbcType=VARCHAR}
- </if>
- <if test="value != null and value != ''">
- and sdi.value = #{value,jdbcType=VARCHAR}
- </if>
- and sdi.del_flag = 0
- limit 1
- </where>
- </select>
- <select id="queryList" resultType="com.middle.platform.system.api.pojo.DictCache">
- select *
- from sys_dict_item sdi
- <where>
- <if test="dictType != null and dictType != ''">
- and sdi.type = #{dictType,jdbcType=VARCHAR}
- </if>
- and sdi.del_flag = 0
- </where>
- </select>
- <!-- 根据ID删除 -->
- <update id="delete">
- update sys_dict_item set del_flag = 1 where id = #{id,jdbcType=BIGINT}
- </update>
- <select id="getById" resultMap="BaseResultMap">
- select *
- from sys_dict_item sdi
- where del_flag = 0
- and id = #{id,jdbcType=BIGINT}
- </select>
- <update id="update">
- update sys_dict_item
- <set>
- <if test="dictId != null">
- `dict_id` = #{dictId,jdbcType=BIGINT},
- </if>
- <if test="value != null">
- `value` = #{value,jdbcType=VARCHAR},
- </if>
- <if test="label != null">
- `label` = #{label,jdbcType=VARCHAR},
- </if>
- <if test="type != null">
- `type` = #{type,jdbcType=VARCHAR},
- </if>
- <if test="desc != null">
- `desc` = #{desc,jdbcType=VARCHAR},
- </if>
- <if test="sort != null">
- `sort` = #{sort,jdbcType=INTEGER}
- </if>
- </set>
- <where>
- id = #{id,jdbcType=BIGINT}
- </where>
- </update>
- </mapper>
|