|
|
@@ -121,19 +121,21 @@ public class ReleaseUserTask {
|
|
|
try {
|
|
|
List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
|
|
|
List<LockingReleaseBo> lockUserList = new ArrayList<LockingReleaseBo>();
|
|
|
- List<LockingReleaseBo> userTmpList = null;
|
|
|
- List<LockingReleaseBo> userTmpList2 = null;
|
|
|
if (userList != null && !userList.isEmpty()) {
|
|
|
for (User u : userList) {
|
|
|
+ List<LockingReleaseBo> userTmpList = null;
|
|
|
+ List<LockingReleaseBo> userTmpList2 = null;
|
|
|
if (StringUtils.isNotBlank(u.getId())) {
|
|
|
// 获取30天释放
|
|
|
userTmpList = customerService.selectWaitReleaseCustomer(u.getId(), 0);
|
|
|
// 获取270天释放
|
|
|
- userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
|
|
|
+ if(!u.getId().equals("734092ad-6564-4021-b7ab-aab5af3a1537")){
|
|
|
+ userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
|
|
|
+ customerService.pushReleaseLog(userTmpList2, 1);
|
|
|
+ }
|
|
|
addUserNotice(userTmpList,userTmpList2);
|
|
|
//
|
|
|
customerService.pushReleaseLog(userTmpList, 0);
|
|
|
- customerService.pushReleaseLog(userTmpList2, 1);
|
|
|
if (userTmpList != null && !userTmpList.isEmpty())
|
|
|
lockUserList.addAll(userTmpList);
|
|
|
if (userTmpList2 != null && !userTmpList2.isEmpty())
|
|
|
@@ -231,17 +233,21 @@ public class ReleaseUserTask {
|
|
|
|
|
|
private void addUserNotice(List<LockingReleaseBo> userTmpList, List<LockingReleaseBo> userTmpList2) {
|
|
|
List<Notice> nl=new ArrayList<Notice>();
|
|
|
- for (LockingReleaseBo u : userTmpList) {
|
|
|
- nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
|
|
|
- NoticeStatus.CUSTOMER_LOSE30.getCode(),
|
|
|
- String.format("您的%s客户【%s】已经30天未跟进,已经自动释放!", "私有", u.getUserName()),
|
|
|
- u.getUid()));
|
|
|
+ if (!userTmpList.isEmpty()) {
|
|
|
+ for (LockingReleaseBo u : userTmpList) {
|
|
|
+ nl.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, u.getAid(),
|
|
|
+ NoticeStatus.CUSTOMER_LOSE30.getCode(),
|
|
|
+ String.format("您的%s客户【%s】已经30天未跟进,已经自动释放!", "私有", u.getUserName()),
|
|
|
+ u.getUid()));
|
|
|
+ }
|
|
|
}
|
|
|
- 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 (!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);
|
|
|
}
|