Commit 75ce9bf9 by “zcwang”

init: Mybatis配置

parent c4a962e7
<?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.netease.mail.yanxuan.change.dal.mapper.ChangeConfigMapper">
<resultMap id="BaseResultMap" type="com.netease.mail.yanxuan.change.dal.entity.ChangeConfig">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="change_subject" jdbcType="INTEGER" property="changeSubject" />
<result column="parent_change_class_id" jdbcType="INTEGER" property="parentChangeClassId" />
<result column="son_change_class_id" jdbcType="INTEGER" property="sonChangeClassId" />
<result column="change_level" jdbcType="INTEGER" property="changeLevel" />
<result column="change_department" jdbcType="VARCHAR" property="changeDepartment" />
<result column="change_commander_type" jdbcType="INTEGER" property="changeCommanderType" />
<result column="change_commander" jdbcType="VARCHAR" property="changeCommander" />
<result column="need_file" jdbcType="INTEGER" property="needFile" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, change_subject, parent_change_class_id, son_change_class_id, change_level, change_department,
change_commander_type, change_commander, need_file, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_yx_change_config
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from tb_yx_change_config
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.netease.mail.yanxuan.change.dal.entity.ChangeConfig" useGeneratedKeys="true">
insert into tb_yx_change_config (change_subject, parent_change_class_id,
son_change_class_id, change_level, change_department,
change_commander_type, change_commander, need_file,
create_time, update_time)
values (#{changeSubject,jdbcType=INTEGER}, #{parentChangeClassId,jdbcType=INTEGER},
#{sonChangeClassId,jdbcType=INTEGER}, #{changeLevel,jdbcType=INTEGER}, #{changeDepartment,jdbcType=VARCHAR},
#{changeCommanderType,jdbcType=INTEGER}, #{changeCommander,jdbcType=VARCHAR}, #{needFile,jdbcType=INTEGER},
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.netease.mail.yanxuan.change.dal.entity.ChangeConfig" useGeneratedKeys="true">
insert into tb_yx_change_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="changeSubject != null">
change_subject,
</if>
<if test="parentChangeClassId != null">
parent_change_class_id,
</if>
<if test="sonChangeClassId != null">
son_change_class_id,
</if>
<if test="changeLevel != null">
change_level,
</if>
<if test="changeDepartment != null">
change_department,
</if>
<if test="changeCommanderType != null">
change_commander_type,
</if>
<if test="changeCommander != null">
change_commander,
</if>
<if test="needFile != null">
need_file,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="changeSubject != null">
#{changeSubject,jdbcType=INTEGER},
</if>
<if test="parentChangeClassId != null">
#{parentChangeClassId,jdbcType=INTEGER},
</if>
<if test="sonChangeClassId != null">
#{sonChangeClassId,jdbcType=INTEGER},
</if>
<if test="changeLevel != null">
#{changeLevel,jdbcType=INTEGER},
</if>
<if test="changeDepartment != null">
#{changeDepartment,jdbcType=VARCHAR},
</if>
<if test="changeCommanderType != null">
#{changeCommanderType,jdbcType=INTEGER},
</if>
<if test="changeCommander != null">
#{changeCommander,jdbcType=VARCHAR},
</if>
<if test="needFile != null">
#{needFile,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.netease.mail.yanxuan.change.dal.entity.ChangeConfig">
update tb_yx_change_config
<set>
<if test="changeSubject != null">
change_subject = #{changeSubject,jdbcType=INTEGER},
</if>
<if test="parentChangeClassId != null">
parent_change_class_id = #{parentChangeClassId,jdbcType=INTEGER},
</if>
<if test="sonChangeClassId != null">
son_change_class_id = #{sonChangeClassId,jdbcType=INTEGER},
</if>
<if test="changeLevel != null">
change_level = #{changeLevel,jdbcType=INTEGER},
</if>
<if test="changeDepartment != null">
change_department = #{changeDepartment,jdbcType=VARCHAR},
</if>
<if test="changeCommanderType != null">
change_commander_type = #{changeCommanderType,jdbcType=INTEGER},
</if>
<if test="changeCommander != null">
change_commander = #{changeCommander,jdbcType=VARCHAR},
</if>
<if test="needFile != null">
need_file = #{needFile,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.netease.mail.yanxuan.change.dal.entity.ChangeConfig">
update tb_yx_change_config
set change_subject = #{changeSubject,jdbcType=INTEGER},
parent_change_class_id = #{parentChangeClassId,jdbcType=INTEGER},
son_change_class_id = #{sonChangeClassId,jdbcType=INTEGER},
change_level = #{changeLevel,jdbcType=INTEGER},
change_department = #{changeDepartment,jdbcType=VARCHAR},
change_commander_type = #{changeCommanderType,jdbcType=INTEGER},
change_commander = #{changeCommander,jdbcType=VARCHAR},
need_file = #{needFile,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=BIGINT},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment