|
|
@@ -75,9 +75,12 @@ public class WeComUserDetailJob {
|
|
|
@XxlJob("syncUserDetail")
|
|
|
public ReturnT<String> syncUserDetail(String param) {
|
|
|
List<ThirdPartWeComStaff> activeStaffList = thirdPartyService.getActiveStaffList();
|
|
|
+ activeStaffList = activeStaffList.stream()
|
|
|
+ .filter(staff -> staff.getId() == 7)
|
|
|
+ .collect(Collectors.toList());
|
|
|
CountDownLatch cdl = new CountDownLatch(activeStaffList.size());
|
|
|
for (ThirdPartWeComStaff staff : activeStaffList) {
|
|
|
- pool.execute(() -> {
|
|
|
+ //pool.execute(() -> {
|
|
|
try {
|
|
|
syncStaffUserDetail(staff);
|
|
|
} catch (Exception e) {
|
|
|
@@ -85,7 +88,7 @@ public class WeComUserDetailJob {
|
|
|
} finally {
|
|
|
cdl.countDown();
|
|
|
}
|
|
|
- });
|
|
|
+ //});
|
|
|
}
|
|
|
try {
|
|
|
cdl.await();
|
|
|
@@ -416,6 +419,7 @@ public class WeComUserDetailJob {
|
|
|
}
|
|
|
// 删除不存在的用户
|
|
|
List<Long> deleteList = existUserList.stream()
|
|
|
+ .filter(user -> Objects.isNull(user.getQuitTime()))
|
|
|
.map(ThirdPartWeComRoomUser::getUin)
|
|
|
.filter(uin -> !currentUniList.contains(uin))
|
|
|
.collect(Collectors.toList());
|