254 lines
9.1 KiB
XML
254 lines
9.1 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.zhwl.printset.mapper.ZdyPrintTemplateModuleMapper">
|
||
|
|
||
|
<resultMap type="ZdyPrintTemplateModule" id="ZdyPrintTemplateModuleResult">
|
||
|
<result property="id" column="id"/>
|
||
|
<result property="templateId" column="template_id"/>
|
||
|
<result property="content" column="content"/>
|
||
|
<result property="textAlign" column="text_align"/>
|
||
|
<result property="fontSize" column="font_size"/>
|
||
|
<result property="fontWeight" column="font_weight"/>
|
||
|
<result property="height" column="height"/>
|
||
|
<result property="fontColor" column="font_color"/>
|
||
|
<result property="backgroudColor" column="backgroud_color"/>
|
||
|
<result property="createTime" column="create_time"/>
|
||
|
<result property="sort" column="sort"/>
|
||
|
<result property="isAuto" column="is_auto"/>
|
||
|
<result property="pageDistance" column="page_distance"/>
|
||
|
<result property="imageDistance" column="image_distance"/>
|
||
|
<result property="imageUrl" column="image_url"/>
|
||
|
<result property="separateType" column="separate_type"/>
|
||
|
<result property="separateStyle" column="separate_style"/>
|
||
|
<result property="title" column="title"/>
|
||
|
<result property="remark" column="remark"/>
|
||
|
<result property="systemModuleId" column="system_module_id"/>
|
||
|
<result property="type" column="type"/>
|
||
|
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectZdyPrintTemplateModuleVo">
|
||
|
select id,
|
||
|
template_id,
|
||
|
content,
|
||
|
text_align,
|
||
|
font_size,
|
||
|
font_weight,
|
||
|
height,
|
||
|
font_color,
|
||
|
backgroud_color,
|
||
|
create_time,
|
||
|
sort,
|
||
|
is_auto,
|
||
|
page_distance,
|
||
|
image_distance,
|
||
|
image_url,
|
||
|
separate_type,
|
||
|
separate_style,
|
||
|
title,
|
||
|
remark,
|
||
|
system_module_id,
|
||
|
type
|
||
|
from zdy_print_template_module ptm
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectZdyPrintTemplateModuleList" parameterType="ZdyPrintTemplateModule"
|
||
|
resultMap="ZdyPrintTemplateModuleResult">
|
||
|
<include refid="selectZdyPrintTemplateModuleVo"/>
|
||
|
<where>
|
||
|
<if test="templateId != null ">
|
||
|
and ptm.template_id = #{templateId}
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectZdyPrintTemplateModuleById" parameterType="Integer"
|
||
|
resultMap="ZdyPrintTemplateModuleResult">
|
||
|
<include refid="selectZdyPrintTemplateModuleVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertZdyPrintTemplateModule" parameterType="ZdyPrintTemplateModule" useGeneratedKeys="true"
|
||
|
keyProperty="id">
|
||
|
insert into zdy_print_template_module
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="templateId != null">template_id,
|
||
|
</if>
|
||
|
<if test="content != null and content != ''">content,
|
||
|
</if>
|
||
|
<if test="textAlign != null">text_align,
|
||
|
</if>
|
||
|
<if test="fontSize != null">font_size,
|
||
|
</if>
|
||
|
<if test="fontWeight != null">font_weight,
|
||
|
</if>
|
||
|
<if test="height != null">height,
|
||
|
</if>
|
||
|
<if test="fontColor != null">font_color,
|
||
|
</if>
|
||
|
<if test="backgroudColor != null">backgroud_color,
|
||
|
</if>
|
||
|
<if test="createTime != null">create_time,
|
||
|
</if>
|
||
|
<if test="sort != null">sort,
|
||
|
</if>
|
||
|
<if test="isAuto != null">is_auto,
|
||
|
</if>
|
||
|
<if test="pageDistance != null">page_distance,
|
||
|
</if>
|
||
|
<if test="imageDistance != null">image_distance,
|
||
|
</if>
|
||
|
<if test="imageUrl != null">image_url,
|
||
|
</if>
|
||
|
<if test="separateType != null">separate_type,
|
||
|
</if>
|
||
|
<if test="separateStyle != null">separate_style,
|
||
|
</if>
|
||
|
<if test="title != null and title != ''">title,
|
||
|
</if>
|
||
|
<if test="remark != null and remark != ''">remark,
|
||
|
</if>
|
||
|
<if test="systemModuleId != null">system_module_id,
|
||
|
</if>
|
||
|
<if test="type != null">type,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="templateId != null">#{templateId},
|
||
|
</if>
|
||
|
<if test="content != null and content != ''">#{content},
|
||
|
</if>
|
||
|
<if test="textAlign != null">#{textAlign},
|
||
|
</if>
|
||
|
<if test="fontSize != null">#{fontSize},
|
||
|
</if>
|
||
|
<if test="fontWeight != null">#{fontWeight},
|
||
|
</if>
|
||
|
<if test="height != null">#{height},
|
||
|
</if>
|
||
|
<if test="fontColor != null">#{fontColor},
|
||
|
</if>
|
||
|
<if test="backgroudColor != null">#{backgroudColor},
|
||
|
</if>
|
||
|
<if test="createTime != null">#{createTime},
|
||
|
</if>
|
||
|
<if test="sort != null">#{sort},
|
||
|
</if>
|
||
|
<if test="isAuto != null">#{isAuto},
|
||
|
</if>
|
||
|
<if test="pageDistance != null">#{pageDistance},
|
||
|
</if>
|
||
|
<if test="imageDistance != null">#{imageDistance},
|
||
|
</if>
|
||
|
<if test="imageUrl != null">#{imageUrl},
|
||
|
</if>
|
||
|
<if test="separateType != null">#{separateType},
|
||
|
</if>
|
||
|
<if test="separateStyle != null">#{separateStyle},
|
||
|
</if>
|
||
|
<if test="title != null">#{title},
|
||
|
</if>
|
||
|
<if test="remark != null and remark != ''">#{remark},
|
||
|
</if>
|
||
|
<if test="systemModuleId != null">#{systemModuleId},
|
||
|
</if>
|
||
|
<if test="type != null">#{type},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateZdyPrintTemplateModule" parameterType="ZdyPrintTemplateModule">
|
||
|
update zdy_print_template_module
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="templateId != null">template_id =
|
||
|
#{templateId},
|
||
|
</if>
|
||
|
<if test="content != null and content != ''">content =
|
||
|
#{content},
|
||
|
</if>
|
||
|
<if test="textAlign != null">text_align =
|
||
|
#{textAlign},
|
||
|
</if>
|
||
|
<if test="fontSize != null">font_size =
|
||
|
#{fontSize},
|
||
|
</if>
|
||
|
<if test="fontWeight != null">font_weight =
|
||
|
#{fontWeight},
|
||
|
</if>
|
||
|
<if test="height != null">height =
|
||
|
#{height},
|
||
|
</if>
|
||
|
<if test="fontColor != null">font_color =
|
||
|
#{fontColor},
|
||
|
</if>
|
||
|
<if test="backgroudColor != null">backgroud_color =
|
||
|
#{backgroudColor},
|
||
|
</if>
|
||
|
<if test="createTime != null">create_time =
|
||
|
#{createTime},
|
||
|
</if>
|
||
|
<if test="sort != null">sort =
|
||
|
#{sort},
|
||
|
</if>
|
||
|
<if test="isAuto != null">is_auto =
|
||
|
#{isAuto},
|
||
|
</if>
|
||
|
<if test="pageDistance != null">page_distance =
|
||
|
#{pageDistance},
|
||
|
</if>
|
||
|
<if test="imageDistance != null">image_distance =
|
||
|
#{imageDistance},
|
||
|
</if>
|
||
|
<if test="imageUrl != null">image_url =
|
||
|
#{imageUrl},
|
||
|
</if>
|
||
|
<if test="separateType != null">separate_type =
|
||
|
#{separateType},
|
||
|
</if>
|
||
|
<if test="separateStyle != null">separate_style =
|
||
|
#{separateStyle},
|
||
|
</if>
|
||
|
<if test="title != null">title =
|
||
|
#{title},
|
||
|
</if>
|
||
|
<if test="remark != null">remark =
|
||
|
#{remark},
|
||
|
</if>
|
||
|
<if test="systemModuleId != null">system_module_id =
|
||
|
#{systemModuleId},
|
||
|
</if>
|
||
|
<if test="type != null">type =
|
||
|
#{type},
|
||
|
</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteZdyPrintTemplateModuleById" parameterType="Integer">
|
||
|
delete
|
||
|
from zdy_print_template_module
|
||
|
where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteZdyPrintTemplateModuleByIds" parameterType="String">
|
||
|
delete from zdy_print_template_module where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
<select id="selectZdyPrintTemplateModuleByTempId" parameterType="Integer"
|
||
|
resultMap="ZdyPrintTemplateModuleResult">
|
||
|
<include refid="selectZdyPrintTemplateModuleVo"/>
|
||
|
where template_id = #{template_id}
|
||
|
</select>
|
||
|
<delete id="deleteZdyPrintTemplateModuleByTempId" parameterType="Integer">
|
||
|
delete
|
||
|
from zdy_print_template_module
|
||
|
where template_id = #{template_id}
|
||
|
</delete>
|
||
|
|
||
|
|
||
|
</mapper>
|