Files
yuaihealth/applet/target/classes/mapper/SysDictMapper.xml
T

72 lines
2.6 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="cn.unizk.mapper.SysDictMapper">
<resultMap id="BaseResultMap" type="cn.unizk.entity.po.SysDict">
<id column="dict_code" jdbcType="INTEGER" property="dictCode" />
<result column="dict_value" jdbcType="VARCHAR" property="dictValue" />
<result column="dict_type" jdbcType="VARCHAR" property="dictType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
dict_code, dict_value, dict_type, create_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from sys_dict
where dict_code = #{dictCode,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from sys_dict
where dict_code = #{dictCode,jdbcType=INTEGER}
</delete>
<insert id="insertSelective" keyColumn="dict_code" keyProperty="dictCode" parameterType="cn.unizk.entity.po.SysDict" useGeneratedKeys="true">
insert into sys_dict
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dictValue != null">
dict_value,
</if>
<if test="dictType != null">
dict_type,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="dictValue != null">
#{dictValue,jdbcType=VARCHAR},
</if>
<if test="dictType != null">
#{dictType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.unizk.entity.po.SysDict">
update sys_dict
<set>
<if test="dictValue != null">
dict_value = #{dictValue,jdbcType=VARCHAR},
</if>
<if test="dictType != null">
dict_type = #{dictType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where dict_code = #{dictCode,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="cn.unizk.entity.po.SysDict">
update sys_dict
set dict_value = #{dictValue,jdbcType=VARCHAR},
dict_type = #{dictType,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where dict_code = #{dictCode,jdbcType=INTEGER}
</update>
</mapper>