|
@@ -53,19 +53,19 @@
|
|
|
join PPW_EMAIL.email_template_info t on t.id = mapping.template_id and t.isvalid = 1 and t.status = 1
|
|
|
where mapping.isvalid=1
|
|
|
<if test="title != null and title != ''">
|
|
|
- mapping.title like concat('%',#{title},'%')
|
|
|
+ and mapping.title like concat('%',#{title},'%')
|
|
|
</if>
|
|
|
<if test="email != null and email != ''">
|
|
|
- mapping.email like concat('%',#{email},'%')
|
|
|
+ and mapping.email like concat('%',#{email},'%')
|
|
|
</if>
|
|
|
<if test="companyName != null and companyName != ''">
|
|
|
- mapping.company_name like concat('%',#{companyName},'%')
|
|
|
+ and mapping.company_name like concat('%',#{companyName},'%')
|
|
|
</if>
|
|
|
<if test="templateName != null and templateName != ''">
|
|
|
- t.name like concat('%',#{templateName},'%')
|
|
|
+ and t.name like concat('%',#{templateName},'%')
|
|
|
</if>
|
|
|
- <if test="status != null">
|
|
|
- mapping.status=#{status}
|
|
|
+ <if test="status != null and status !=''">
|
|
|
+ and mapping.status=#{status}
|
|
|
</if>
|
|
|
limit #{offset},#{pageSize}
|
|
|
</select>
|
|
@@ -75,19 +75,19 @@
|
|
|
join PPW_EMAIL.email_template_info t on t.id = mapping.template_id and t.isvalid = 1 and t.status = 1
|
|
|
where mapping.isvalid=1
|
|
|
<if test="title != null and title != ''">
|
|
|
- mapping.title like concat('%',#{title},'%')
|
|
|
+ and mapping.title like concat('%',#{title},'%')
|
|
|
</if>
|
|
|
<if test="email != null and email != ''">
|
|
|
- mapping.email like concat('%',#{email},'%')
|
|
|
+ and mapping.email like concat('%',#{email},'%')
|
|
|
</if>
|
|
|
<if test="companyName != null and companyName != ''">
|
|
|
- mapping.company_name like concat('%',#{companyName},'%')
|
|
|
+ and mapping.company_name like concat('%',#{companyName},'%')
|
|
|
</if>
|
|
|
<if test="templateName != null and templateName != ''">
|
|
|
- t.name like concat('%',#{templateName},'%')
|
|
|
+ and t.name like concat('%',#{templateName},'%')
|
|
|
</if>
|
|
|
- <if test="status != null">
|
|
|
- mapping.status=#{status}
|
|
|
+ <if test="status != null and status !=''">
|
|
|
+ and mapping.status=#{status}
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="searchTemplateById" resultMap="BaseResultMap">
|