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/SystemPDFTemplateDao.xml

181 lines
6.3 KiB
XML

2 years ago
<?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.SystemPDFTemplateDao">
<select id="queryPage" parameterType="com.glxp.api.req.system.FilterPdfTemplateRequest"
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
SELECT id,
name,
type,
module,
param,
path,
rowCount,
qrcodeCount,
remark,
create_time,
update_time as update_time,
jrxmlPath,
bussinessType,
bussinessStatus
2 years ago
FROM sys_pdf_template
<where>
<if test="name != null and '' != name">
AND `name` LIKE CONCAT('%', #{name}, '%')
2 years ago
</if>
<if test="module != null">
2 years ago
AND `module` = #{module}
</if>
</where>
order by update_time desc
</select>
<select id="findSystemPDFTemplate" parameterType="com.glxp.api.req.system.FilterPdfTemplateRequest"
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
SELECT *
FROM sys_pdf_template
WHERE id = #{id}
</select>
<select id="selectById" parameterType="java.lang.String"
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
select *
FROM sys_pdf_template
WHERE id = #{id}
</select>
<update id="updateById" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
UPDATE sys_pdf_template
<set>
<if test="name != null">
name=#{name},
</if>
<if test="type != null">
type=#{type},
</if>
<if test="module != null">
module=#{module},
</if>
<if test="param != null">
param=#{param},
</if>
<if test="path != null">
path=#{path},
</if>
<if test="rowCount != null">
rowCount=#{rowCount},
</if>
<if test="qrcodeCount != null">
qrcodeCount=#{qrcodeCount},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="create_time != null">
create_time=#{create_time},
</if>
<if test="update_time != null">
update_time=#{update_time},
</if>
<if test="jrxmlPath != null">
jrxmlPath=#{jrxmlPath},
</if>
<if test="bussinessType != null">
bussinessType=#{bussinessType},
</if>
<if test="bussinessStatus != null">
bussinessStatus=#{bussinessStatus},
</if>
2 years ago
</set>
WHERE id = #{id}
2 years ago
</update>
<insert id="insertEntity" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
2 years ago
insert INTO sys_pdf_template(name,
type, module, param, path, rowCount, qrcodeCount, remark, create_time,
update_time, jrxmlPath, bussinessType, bussinessStatus)
2 years ago
values (#{name},
#{type},
#{module},
#{param},
#{path},
#{rowCount},
#{qrcodeCount},
#{remark},
#{create_time},
#{update_time}, #{jrxmlPath}, #{bussinessType}, #{bussinessStatus})
2 years ago
</insert>
<select id="listPDFTemplates" parameterType="java.lang.Integer"
resultType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
SELECT id, name
FROM sys_pdf_template
</select>
<delete id="deleteById" parameterType="java.lang.Integer">
delete
from sys_pdf_template
where id = #{id}
</delete>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity" useGeneratedKeys="true">
insert into sys_pdf_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
`name`,
`type`,
`module`,
param,
`path`,
`rowCount`,
qrcodeCount,
remark,
create_time,
update_time,
jrxmlPath,
bussinessType,
bussinessStatus,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{name,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER},
#{module,jdbcType=INTEGER},
#{param,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR},
#{rowCount,jdbcType=INTEGER},
#{qrcodeCount,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR},
#{create_time,jdbcType=TIMESTAMP},
#{update_time,jdbcType=TIMESTAMP},
#{jrxmlPath,jdbcType=VARCHAR},
#{bussinessType,jdbcType=VARCHAR},
#{bussinessStatus,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
`name` = #{name,jdbcType=VARCHAR},
`type` = #{type,jdbcType=INTEGER},
`module` = #{module,jdbcType=INTEGER},
param = #{param,jdbcType=VARCHAR},
`path` = #{path,jdbcType=VARCHAR},
`rowCount` = #{rowCount,jdbcType=INTEGER},
qrcodeCount = #{qrcodeCount,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{create_time,jdbcType=TIMESTAMP},
update_time = #{update_time,jdbcType=TIMESTAMP},
jrxmlPath = #{jrxmlPath,jdbcType=VARCHAR},
bussinessType = #{bussinessType,jdbcType=VARCHAR},
bussinessStatus = #{bussinessStatus,jdbcType=VARCHAR},
</trim>
</insert>
2 years ago
</mapper>