Browse Source

屏蔽离职人员发送企业微信消息

yumeng 5 years ago
parent
commit
678a34da8c

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BidWarningServiceImpl.java

@@ -110,7 +110,6 @@ public class BidWarningServiceImpl implements IBidWarningService {
         String createTime = DateUtils.getNowDate("yyyy-MM-dd");
         Integer count = mailLogMapper.selectCountByAccountIdAndDate(accountId, createTime, 1);
         StringBuilder text = new StringBuilder();
-
         String s = "";
         for (int i = 0; i < unitWarning.size(); i++) {
             s += unitWarning.get(i) + "," + "<br/>";

+ 10 - 4
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/MailLogMapper.xml

@@ -4,7 +4,6 @@
 
 
     <select id="selectCountByAccountIdAndDate" resultType="java.lang.Integer">
-
         select
         count(1)
         from
@@ -23,6 +22,7 @@
      left join sys_user t2
      on t1.user_id = t2.id
      where t1.project_id = #{projectId}
+     and t2.`status` = 1
      and t2.email != ''
     </select>
 
@@ -34,14 +34,20 @@
      ctop_project_member t1
      left join ctop_corp_wexin_user t2
      on t1.user_id = t2.user_id
+     LEFT JOIN sys_user t3
+     on  t1.user_id = t3.id
      where t1.project_id = #{projectId}
+     and t3.`status` = 1
      and t2.wexin_id != ''
     </select>
 
     <select id="getWChatIdByUserId" resultType="java.lang.String">
-    select wexin_id
-    from ctop_corp_wexin_user
-    where  user_id = #{userId}
+    select t1.wexin_id
+    from ctop_corp_wexin_user t1
+    left join  sys_user t2
+    on  t1.user_id = t2.id
+    where  t1.user_id = #{userId}
+    and t2.`status` = 1
 
     </select>