|
@@ -1,6 +1,10 @@
|
|
package org.fouram.service;
|
|
package org.fouram.service;
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
import org.fouram.core.base.service.BaseService;
|
|
import org.fouram.core.base.service.BaseService;
|
|
|
|
+import org.fouram.core.plugin.weixin.cp.util.WXCpMessageUtil;
|
|
|
|
+import org.fouram.entity.SapUser;
|
|
import org.fouram.enums.DelFlagEnum;
|
|
import org.fouram.enums.DelFlagEnum;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -30,21 +34,17 @@ public class SyncSapUserToWxService extends BaseService {
|
|
sapUserService.updateAbnormalResult();
|
|
sapUserService.updateAbnormalResult();
|
|
// 更新用户头像
|
|
// 更新用户头像
|
|
sapUserService.updateAvatars();
|
|
sapUserService.updateAvatars();
|
|
-
|
|
|
|
- // 部分数据插入微信未成功,处理数据后,重新插入
|
|
|
|
-// List<SapUser> unSyncSapUsers = sapUserService.selectUnSyncList();
|
|
|
|
-// LoggerUtil.info("部分未成功插入数据->" + unSyncSapUsers.size());
|
|
|
|
-// for (SapUser sapUser : unSyncSapUsers) {
|
|
|
|
-// sapUserService.updateSyncWxResult(sapUser.getPersonId());
|
|
|
|
-// }
|
|
|
|
-// LoggerUtil.info("同步结束->" + DateUtil.getTime());
|
|
|
|
|
|
+ // NORMAL数据更新同步企业微信
|
|
|
|
+ sapUserService.updateAllNormalSyncWxResult();
|
|
|
|
+ // 发送禁用企业微信账号信息
|
|
|
|
+ this.sendQuitUserMsg();
|
|
}
|
|
}
|
|
|
|
|
|
// 发送禁用企业微信账号信息
|
|
// 发送禁用企业微信账号信息
|
|
-// private void sendQuitUserMsg() throws Exception {
|
|
|
|
-// List<SapUser> unableSapUsers = sapUserService.selectListByDelFlag(DelFlagEnum.UNABLE.getCode());
|
|
|
|
-// if (unableSapUsers.size() > 0) {
|
|
|
|
-// WXCpMessageUtil.sendQuitUserMsg("离职用户" + unableSapUsers.size() + "个,请确认");
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
+ private void sendQuitUserMsg() throws Exception {
|
|
|
|
+ List<SapUser> unableSapUsers = sapUserService.selectPrimaryListByDelFlag(DelFlagEnum.UNABLE.getCode());
|
|
|
|
+ if (unableSapUsers.size() > 0) {
|
|
|
|
+ WXCpMessageUtil.sendQuitUserMsg("离职用户" + unableSapUsers.size() + "个,请确认");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|