You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.7 KiB
41 lines
1.7 KiB
<?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.epmet.dao.PublicTemplateDao">
|
|
|
|
<resultMap type="com.epmet.entity.PublicTemplateEntity" id="publicTemplateMap">
|
|
<result property="id" column="ID"/>
|
|
<result property="tid" column="TID"/>
|
|
<result property="title" column="TITLE"/>
|
|
<result property="type" column="TYPE"/>
|
|
<result property="categoryId" column="CATEGORY_ID"/>
|
|
<result property="revision" column="REVISION"/>
|
|
<result property="delFlag" column="DEL_FLAG"/>
|
|
<result property="createdBy" column="CREATED_BY"/>
|
|
<result property="createdTime" column="CREATED_TIME"/>
|
|
<result property="updatedBy" column="UPDATED_BY"/>
|
|
<result property="updatedTime" column="UPDATED_TIME"/>
|
|
</resultMap>
|
|
<delete id="deleteTempByCategoryId" parameterType="list">
|
|
DELETE FROM public_template WHERE 1=1
|
|
<foreach collection="list" item="item" open="AND( " separator=" OR " index="index" close=")">
|
|
CATEGORY_ID = #{item}
|
|
</foreach>
|
|
</delete>
|
|
<select id="getPubTempList" resultType="com.epmet.dto.result.PubTemplateResultDTO" parameterType="com.epmet.dto.form.PubTemplateFormDTO">
|
|
select TID,
|
|
TITLE,
|
|
TYPE,
|
|
CATEGORY_ID
|
|
from public_template
|
|
where 1=1
|
|
<if test="title != null and title.trim() != ''">
|
|
AND TITLE LIKE CONCAT('%',#{title},'%')
|
|
</if>
|
|
<if test="ids != null and ids.trim() != ''">
|
|
AND CATEGORY_ID = #{ids}
|
|
</if>
|
|
</select>
|
|
|
|
|
|
</mapper>
|