<?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.ots.project.exam.mapper.EntEmailTemplateMapper">
|
<resultMap id="BaseResultMap" type="EntEmailTemplate">
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="invite_cn_template" jdbcType="VARCHAR" property="inviteCnTemplate" />
|
<result column="invite_us_template" jdbcType="VARCHAR" property="inviteUsTemplate" />
|
<result column="invite_th_template" jdbcType="VARCHAR" property="inviteThTemplate" />
|
<result column="hr_cn_template" jdbcType="VARCHAR" property="hrCnTemplate" />
|
<result column="hr_us_template" jdbcType="VARCHAR" property="hrUsTemplate" />
|
<result column="hr_th_template" jdbcType="VARCHAR" property="hrThTemplate" />
|
<result column="member_cn_template" jdbcType="VARCHAR" property="memberCnTemplate" />
|
<result column="member_us_template" jdbcType="VARCHAR" property="memberUsTemplate" />
|
<result column="member_th_template" jdbcType="VARCHAR" property="memberThTemplate" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
</resultMap>
|
<sql id="Base_Column_List">
|
id, invite_cn_template, invite_us_template, invite_th_template, hr_cn_template, hr_us_template,
|
hr_th_template, member_cn_template, member_us_template, member_th_template, create_time,
|
create_by
|
</sql>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from ent_email_template
|
where id = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
delete from ent_email_template
|
where id = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="EntEmailTemplate" useGeneratedKeys="true">
|
insert into ent_email_template (invite_cn_template, invite_us_template,
|
invite_th_template, hr_cn_template, hr_us_template,
|
hr_th_template, member_cn_template, member_us_template,
|
member_th_template, create_time, create_by
|
)
|
values (#{inviteCnTemplate,jdbcType=VARCHAR}, #{inviteUsTemplate,jdbcType=VARCHAR},
|
#{inviteThTemplate,jdbcType=VARCHAR}, #{hrCnTemplate,jdbcType=VARCHAR}, #{hrUsTemplate,jdbcType=VARCHAR},
|
#{hrThTemplate,jdbcType=VARCHAR}, #{memberCnTemplate,jdbcType=VARCHAR}, #{memberUsTemplate,jdbcType=VARCHAR},
|
#{memberThTemplate,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}
|
)
|
</insert>
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="EntEmailTemplate" useGeneratedKeys="true">
|
insert into ent_email_template
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="inviteCnTemplate != null">
|
invite_cn_template,
|
</if>
|
<if test="inviteUsTemplate != null">
|
invite_us_template,
|
</if>
|
<if test="inviteThTemplate != null">
|
invite_th_template,
|
</if>
|
<if test="hrCnTemplate != null">
|
hr_cn_template,
|
</if>
|
<if test="hrUsTemplate != null">
|
hr_us_template,
|
</if>
|
<if test="hrThTemplate != null">
|
hr_th_template,
|
</if>
|
<if test="memberCnTemplate != null">
|
member_cn_template,
|
</if>
|
<if test="memberUsTemplate != null">
|
member_us_template,
|
</if>
|
<if test="memberThTemplate != null">
|
member_th_template,
|
</if>
|
<if test="createTime != null">
|
create_time,
|
</if>
|
<if test="createBy != null">
|
create_by,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="inviteCnTemplate != null">
|
#{inviteCnTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="inviteUsTemplate != null">
|
#{inviteUsTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="inviteThTemplate != null">
|
#{inviteThTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="hrCnTemplate != null">
|
#{hrCnTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="hrUsTemplate != null">
|
#{hrUsTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="hrThTemplate != null">
|
#{hrThTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="memberCnTemplate != null">
|
#{memberCnTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="memberUsTemplate != null">
|
#{memberUsTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="memberThTemplate != null">
|
#{memberThTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createBy != null">
|
#{createBy,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="EntEmailTemplate">
|
update ent_email_template
|
<set>
|
<if test="inviteCnTemplate != null">
|
invite_cn_template = #{inviteCnTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="inviteUsTemplate != null">
|
invite_us_template = #{inviteUsTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="inviteThTemplate != null">
|
invite_th_template = #{inviteThTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="hrCnTemplate != null">
|
hr_cn_template = #{hrCnTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="hrUsTemplate != null">
|
hr_us_template = #{hrUsTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="hrThTemplate != null">
|
hr_th_template = #{hrThTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="memberCnTemplate != null">
|
member_cn_template = #{memberCnTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="memberUsTemplate != null">
|
member_us_template = #{memberUsTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="memberThTemplate != null">
|
member_th_template = #{memberThTemplate,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null">
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createBy != null">
|
create_by = #{createBy,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="EntEmailTemplate">
|
update ent_email_template
|
set invite_cn_template = #{inviteCnTemplate,jdbcType=VARCHAR},
|
invite_us_template = #{inviteUsTemplate,jdbcType=VARCHAR},
|
invite_th_template = #{inviteThTemplate,jdbcType=VARCHAR},
|
hr_cn_template = #{hrCnTemplate,jdbcType=VARCHAR},
|
hr_us_template = #{hrUsTemplate,jdbcType=VARCHAR},
|
hr_th_template = #{hrThTemplate,jdbcType=VARCHAR},
|
member_cn_template = #{memberCnTemplate,jdbcType=VARCHAR},
|
member_us_template = #{memberUsTemplate,jdbcType=VARCHAR},
|
member_th_template = #{memberThTemplate,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
create_by = #{createBy,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<select id="getOnly" resultMap="BaseResultMap">
|
SELECT * FROM ent_email_template limit 0,1
|
</select>
|
</mapper>
|