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.
udi-spms-java/src/main/resources/mybatis/mapper/system/SysPdfTemplateRelevanceLabe...

482 lines
18 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.system.SysPdfTemplateRelevanceLabelDao">
<resultMap id="BaseResultMap" type="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity">
<!--@mbg.generated-->
<!--@Table sys_pdf_template_relevance_label-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="templateId" jdbcType="INTEGER" property="templateId" />
<result column="customerId" jdbcType="BIGINT" property="customerId" />
<result column="adminId" jdbcType="INTEGER" property="adminId" />
<result column="moduleId" jdbcType="INTEGER" property="moduleId" />
<result column="localAction" jdbcType="VARCHAR" property="localAction" />
<result column="remark1" jdbcType="VARCHAR" property="remark1" />
<result column="remark2" jdbcType="VARCHAR" property="remark2" />
<result column="remark3" jdbcType="VARCHAR" property="remark3" />
<result column="printType" jdbcType="TINYINT" property="printType" />
<result column="modelKey" jdbcType="VARCHAR" property="modelKey" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3,
printType, modelKey
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
select
<include refid="Base_Column_List" />
from sys_pdf_template_relevance_label
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from sys_pdf_template_relevance_label
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sys_pdf_template_relevance_label (templateId, customerId, adminId,
moduleId, localAction, remark1,
remark2, remark3, printType,
modelKey)
values (#{templateId,jdbcType=INTEGER}, #{customerId,jdbcType=BIGINT}, #{adminId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER}, #{localAction,jdbcType=VARCHAR}, #{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR}, #{remark3,jdbcType=VARCHAR}, #{printType,jdbcType=TINYINT},
#{modelKey,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sys_pdf_template_relevance_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="templateId != null">
templateId,
</if>
<if test="customerId != null">
customerId,
</if>
<if test="adminId != null">
adminId,
</if>
<if test="moduleId != null">
moduleId,
</if>
<if test="localAction != null">
localAction,
</if>
<if test="remark1 != null">
remark1,
</if>
<if test="remark2 != null">
remark2,
</if>
<if test="remark3 != null">
remark3,
</if>
<if test="printType != null">
printType,
</if>
<if test="modelKey != null">
modelKey,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="templateId != null">
#{templateId,jdbcType=INTEGER},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="adminId != null">
#{adminId,jdbcType=INTEGER},
</if>
<if test="moduleId != null">
#{moduleId,jdbcType=INTEGER},
</if>
<if test="localAction != null">
#{localAction,jdbcType=VARCHAR},
</if>
<if test="remark1 != null">
#{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null">
#{remark2,jdbcType=VARCHAR},
</if>
<if test="remark3 != null">
#{remark3,jdbcType=VARCHAR},
</if>
<if test="printType != null">
#{printType,jdbcType=TINYINT},
</if>
<if test="modelKey != null">
#{modelKey,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity">
<!--@mbg.generated-->
update sys_pdf_template_relevance_label
<set>
<if test="templateId != null">
templateId = #{templateId,jdbcType=INTEGER},
</if>
<if test="customerId != null">
customerId = #{customerId,jdbcType=BIGINT},
</if>
<if test="adminId != null">
adminId = #{adminId,jdbcType=INTEGER},
</if>
<if test="moduleId != null">
moduleId = #{moduleId,jdbcType=INTEGER},
</if>
<if test="localAction != null">
localAction = #{localAction,jdbcType=VARCHAR},
</if>
<if test="remark1 != null">
remark1 = #{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null">
remark2 = #{remark2,jdbcType=VARCHAR},
</if>
<if test="remark3 != null">
remark3 = #{remark3,jdbcType=VARCHAR},
</if>
<if test="printType != null">
printType = #{printType,jdbcType=TINYINT},
</if>
<if test="modelKey != null">
modelKey = #{modelKey,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity">
<!--@mbg.generated-->
update sys_pdf_template_relevance_label
set templateId = #{templateId,jdbcType=INTEGER},
customerId = #{customerId,jdbcType=BIGINT},
adminId = #{adminId,jdbcType=INTEGER},
moduleId = #{moduleId,jdbcType=INTEGER},
localAction = #{localAction,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
printType = #{printType,jdbcType=TINYINT},
modelKey = #{modelKey,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update sys_pdf_template_relevance_label
<trim prefix="set" suffixOverrides=",">
<trim prefix="templateId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.templateId,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="customerId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.customerId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="adminId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.adminId,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="moduleId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.moduleId,jdbcType=INTEGER}
</foreach>
</trim>
<trim prefix="localAction = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.localAction,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="remark1 = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.remark1,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="remark2 = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.remark2,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="remark3 = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.remark3,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="printType = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.printType,jdbcType=TINYINT}
</foreach>
</trim>
<trim prefix="modelKey = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.modelKey,jdbcType=VARCHAR}
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update sys_pdf_template_relevance_label
<trim prefix="set" suffixOverrides=",">
<trim prefix="templateId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.templateId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.templateId,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="customerId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.customerId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.customerId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="adminId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.adminId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.adminId,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="moduleId = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.moduleId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.moduleId,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim prefix="localAction = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.localAction != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.localAction,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="remark1 = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.remark1 != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.remark1,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="remark2 = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.remark2 != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.remark2,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="remark3 = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.remark3 != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.remark3,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="printType = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.printType != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.printType,jdbcType=TINYINT}
</if>
</foreach>
</trim>
<trim prefix="modelKey = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.modelKey != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.modelKey,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sys_pdf_template_relevance_label
(templateId, customerId, adminId, moduleId, localAction, remark1, remark2, remark3,
printType, modelKey)
values
<foreach collection="list" item="item" separator=",">
(#{item.templateId,jdbcType=INTEGER}, #{item.customerId,jdbcType=BIGINT}, #{item.adminId,jdbcType=INTEGER},
#{item.moduleId,jdbcType=INTEGER}, #{item.localAction,jdbcType=VARCHAR}, #{item.remark1,jdbcType=VARCHAR},
#{item.remark2,jdbcType=VARCHAR}, #{item.remark3,jdbcType=VARCHAR}, #{item.printType,jdbcType=TINYINT},
#{item.modelKey,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sys_pdf_template_relevance_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
templateId,
customerId,
adminId,
moduleId,
localAction,
remark1,
remark2,
remark3,
printType,
modelKey,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{templateId,jdbcType=INTEGER},
#{customerId,jdbcType=BIGINT},
#{adminId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER},
#{localAction,jdbcType=VARCHAR},
#{remark1,jdbcType=VARCHAR},
#{remark2,jdbcType=VARCHAR},
#{remark3,jdbcType=VARCHAR},
#{printType,jdbcType=TINYINT},
#{modelKey,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
templateId = #{templateId,jdbcType=INTEGER},
customerId = #{customerId,jdbcType=BIGINT},
adminId = #{adminId,jdbcType=INTEGER},
moduleId = #{moduleId,jdbcType=INTEGER},
localAction = #{localAction,jdbcType=VARCHAR},
remark1 = #{remark1,jdbcType=VARCHAR},
remark2 = #{remark2,jdbcType=VARCHAR},
remark3 = #{remark3,jdbcType=VARCHAR},
printType = #{printType,jdbcType=TINYINT},
modelKey = #{modelKey,jdbcType=VARCHAR},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.api.entity.system.SysPdfTemplateRelevanceLabelEntity" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into sys_pdf_template_relevance_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="templateId != null">
templateId,
</if>
<if test="customerId != null">
customerId,
</if>
<if test="adminId != null">
adminId,
</if>
<if test="moduleId != null">
moduleId,
</if>
<if test="localAction != null">
localAction,
</if>
<if test="remark1 != null">
remark1,
</if>
<if test="remark2 != null">
remark2,
</if>
<if test="remark3 != null">
remark3,
</if>
<if test="printType != null">
printType,
</if>
<if test="modelKey != null">
modelKey,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="templateId != null">
#{templateId,jdbcType=INTEGER},
</if>
<if test="customerId != null">
#{customerId,jdbcType=BIGINT},
</if>
<if test="adminId != null">
#{adminId,jdbcType=INTEGER},
</if>
<if test="moduleId != null">
#{moduleId,jdbcType=INTEGER},
</if>
<if test="localAction != null">
#{localAction,jdbcType=VARCHAR},
</if>
<if test="remark1 != null">
#{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null">
#{remark2,jdbcType=VARCHAR},
</if>
<if test="remark3 != null">
#{remark3,jdbcType=VARCHAR},
</if>
<if test="printType != null">
#{printType,jdbcType=TINYINT},
</if>
<if test="modelKey != null">
#{modelKey,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="templateId != null">
templateId = #{templateId,jdbcType=INTEGER},
</if>
<if test="customerId != null">
customerId = #{customerId,jdbcType=BIGINT},
</if>
<if test="adminId != null">
adminId = #{adminId,jdbcType=INTEGER},
</if>
<if test="moduleId != null">
moduleId = #{moduleId,jdbcType=INTEGER},
</if>
<if test="localAction != null">
localAction = #{localAction,jdbcType=VARCHAR},
</if>
<if test="remark1 != null">
remark1 = #{remark1,jdbcType=VARCHAR},
</if>
<if test="remark2 != null">
remark2 = #{remark2,jdbcType=VARCHAR},
</if>
<if test="remark3 != null">
remark3 = #{remark3,jdbcType=VARCHAR},
</if>
<if test="printType != null">
printType = #{printType,jdbcType=TINYINT},
</if>
<if test="modelKey != null">
modelKey = #{modelKey,jdbcType=VARCHAR},
</if>
</trim>
</insert>
</mapper>