Jelajahi Sumber

fix: 公司邮箱发送状态查询整改

chenjianhua 7 bulan lalu
induk
melakukan
67493772f0

+ 8 - 2
service-base/src/main/resources/mapper/CompanyEmailHistoryMapper.xml

@@ -55,9 +55,12 @@
         <if test="email != null and email !=''">
             and cec.email like concat('%',#{email},'%')
         </if>
-        <if test="sendStatus != null">
+        <if test="sendStatus != null and sendStatus != -1">
             and maxce.send_status=#{sendStatus}
         </if>
+        <if test="sendStatus == -1">
+            and maxce.send_status is null
+        </if>
         order by maxce.send_time desc
         limit #{offset},#{pageSize}
     </select>
@@ -79,9 +82,12 @@
         <if test="email != null and email !=''">
             and cec.email like concat('%',#{email},'%')
         </if>
-        <if test="sendStatus != null">
+        <if test="sendStatus != null and sendStatus != -1">
             and maxce.send_status=#{sendStatus}
         </if>
+        <if test="sendStatus == -1">
+            and maxce.send_status is null
+        </if>
     </select>
 
     <select id="searchEmailHistory" resultMap="BaseResultMap">