|
|
|
<?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,jrxmlPath,bussinessType,bussinessStatus
|
|
|
|
FROM sys_pdf_template
|
|
|
|
<where>
|
|
|
|
<if test="name != null and '' != name">
|
|
|
|
AND `name` LIKE CONCAT('%',#{name},'%')
|
|
|
|
</if>
|
|
|
|
<if test="module != null ">
|
|
|
|
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>
|
|
|
|
|
|
|
|
</set>
|
|
|
|
WHERE id=#{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<insert id="insert" parameterType="com.glxp.api.entity.system.SystemPDFTemplateEntity">
|
|
|
|
insert INTO sys_pdf_template(name,
|
|
|
|
type, module, param, path, rowCount, qrcodeCount, remark, create_time,
|
|
|
|
update_time, jrxmlPath,bussinessType,bussinessStatus)
|
|
|
|
values (#{name},
|
|
|
|
#{type},
|
|
|
|
#{module},
|
|
|
|
#{param},
|
|
|
|
#{path},
|
|
|
|
#{rowCount},
|
|
|
|
#{qrcodeCount},
|
|
|
|
#{remark},
|
|
|
|
#{create_time},
|
|
|
|
#{update_time}, #{jrxmlPath},#{bussinessType},#{bussinessStatus})
|
|
|
|
</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>
|
|
|
|
</mapper>
|