|
|
@@ -123,22 +123,14 @@ public class ReleaseUserTask {
|
|
|
if (userList != null && !userList.isEmpty()) {
|
|
|
for (User u : userList) {
|
|
|
List<LockingReleaseBo> userTmpList = new ArrayList<LockingReleaseBo>();
|
|
|
- List<LockingReleaseBo> userTmpList2 = new ArrayList<LockingReleaseBo>();
|
|
|
+
|
|
|
if (StringUtils.isNotBlank(u.getId())) {
|
|
|
// 获取30天释放
|
|
|
- userTmpList = customerService.selectWaitReleaseCustomer(u.getId(), 0);
|
|
|
+ userTmpList = customerService.selectWaitReleaseCustomer(u.getId());
|
|
|
customerService.pushReleaseLog(userTmpList, 0);
|
|
|
- // 获取270天释放
|
|
|
- if(!u.getId().equals("734092ad-6564-4021-b7ab-aab5af3a1537")){
|
|
|
- userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
|
|
|
- customerService.pushReleaseLog(userTmpList2, 1);
|
|
|
- }
|
|
|
- addUserNotice(userTmpList,userTmpList2);
|
|
|
- //
|
|
|
+ addUserNotice(userTmpList);
|
|
|
if (userTmpList != null && !userTmpList.isEmpty())
|
|
|
lockUserList.addAll(userTmpList);
|
|
|
- if (userTmpList2 != null && !userTmpList2.isEmpty())
|
|
|
- lockUserList.addAll(userTmpList2);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -232,7 +224,7 @@ public class ReleaseUserTask {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void addUserNotice(List<LockingReleaseBo> userTmpList, List<LockingReleaseBo> userTmpList2) {
|
|
|
+ private void addUserNotice(List<LockingReleaseBo> userTmpList) {
|
|
|
List<Notice> nl=new ArrayList<Notice>();
|
|
|
if (!userTmpList.isEmpty()) {
|
|
|
for (LockingReleaseBo u : userTmpList) {
|
|
|
@@ -245,14 +237,7 @@ public class ReleaseUserTask {
|
|
|
u.getUid()));
|
|
|
}
|
|
|
}
|
|
|
- if (!userTmpList2.isEmpty()) {
|
|
|
- for (LockingReleaseBo u : userTmpList2) {
|
|
|
- nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
|
|
|
- NoticeStatus.CUSTOMER_LOSE270.getCode(),
|
|
|
- String.format("您的%s客户【%s】已经270天未签单,已经自动释放!", "私有", u.getUserName()),
|
|
|
- u.getUid()));
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
if(!nl.isEmpty())addNoticeBatch(nl);
|
|
|
}
|
|
|
|