Просмотр исходного кода

fix: 发送历史查询数据有误修复

chenjianhua 6 месяцев назад
Родитель
Сommit
27a8e47ebd

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

@@ -152,13 +152,13 @@
         FROM
         PPW_EMAIL.company_email_send_history cesh
         JOIN PPW_EMAIL.company_email_config cec
-        ON cec.email = cesh.email
+        ON cec.email = cesh.email and cesh.company_id=cec.company_id
         JOIN PPW_EMAIL.pvn_company_info c
-        ON cec.company_id = c.company_id
+        ON cesh.company_id = c.company_id
         WHERE cec.isvalid = 1
         AND cesh.isvalid = 1 and c.isvalid =1
         <if test="companyId != null and companyId !=''">
-            and c.company_id=#{companyId}
+            and cesh.company_id=#{companyId}
         </if>
         <if test="email != null and email !=''">
             and cesh.email=#{email}