|
|
@@ -285,7 +285,6 @@ public class ReleaseUserTask {
|
|
|
Date releaseTime = new Date();
|
|
|
try {
|
|
|
List<LockingReleaseBo> lockUserList = new ArrayList<>();
|
|
|
- List<LockingReleaseBo> users=new ArrayList<>();
|
|
|
if (userList != null && !userList.isEmpty()) {
|
|
|
for (User u : userList) {
|
|
|
System.out.println(u.getId());
|
|
|
@@ -302,7 +301,7 @@ public class ReleaseUserTask {
|
|
|
customerService.pushReleaseLog(users1);
|
|
|
addUserNotice(users1);
|
|
|
if (!users1.isEmpty()){
|
|
|
- users.addAll(users1);
|
|
|
+ lockUserList.addAll(users1);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -321,23 +320,14 @@ public class ReleaseUserTask {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- //新增客户丢失
|
|
|
- if (!users.isEmpty()) {
|
|
|
- List<LockingReleaseBo> releaseList = new ArrayList<>();
|
|
|
- for (int i = 0; i < users.size(); i++) {
|
|
|
- releaseList.add(users.get(i));
|
|
|
- if (pointsDataLimit == releaseList.size() || i == users.size() - 1) {
|
|
|
- customerService.updatePendingReleaseLock(releaseList);
|
|
|
- newList.clear();
|
|
|
- Thread.sleep(2000);
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
//处理每个人重复的天数
|
|
|
pushSalesmanCount(lockUserList);
|
|
|
pushChannel(releaseTime, userList);
|
|
|
+ //客户释放
|
|
|
+ List<LockingReleaseBo> lockList = customerService.selectPendinglockUserList();
|
|
|
+ if (!lockList.isEmpty()){
|
|
|
+ customerService.updateReleaseLock(releaseTime);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
Notice n = new Notice(UUID.randomUUID().toString(), new Date(), 0, "1",
|
|
|
NoticeStatus.TASK_PATENT_ERROR.getCode(), "==============客户释放失败================",null);
|
|
|
@@ -402,9 +392,7 @@ public class ReleaseUserTask {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- List<LockingReleaseBo> lockList = customerService.selectPendinglockUserList();
|
|
|
- if (!lockList.isEmpty())
|
|
|
- customerService.updateReleaseLock(releaseTime);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void addNotice(Notice n ) {
|