Forráskód Böngészése

feat: 模版配置接口调整

chenjianhua 7 hónapja
szülő
commit
d109eb0d18

+ 12 - 12
service-base/src/main/resources/mapper/EmailTemplateMappingMapper.xml

@@ -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">