|
|
@@ -72,9 +72,11 @@ public class ReleaseUserTask {
|
|
|
for (userDaysBo ub : userTmpList) {
|
|
|
String str=null;
|
|
|
if (ub.getChannel() == 0) {
|
|
|
- str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时跟进或者限时签单!", "私有", ub.getName());
|
|
|
+ str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时%s!",
|
|
|
+ "私有", ub.getName(),ub.getType()==0?"跟进":"签单");
|
|
|
+
|
|
|
}else {
|
|
|
- str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时跟进或者限时签单!", "渠道", ub.getName());
|
|
|
+ str = String.format("您的%s客户【%s】剩余天数不足十五天,请及时签单!", "渠道", ub.getName());
|
|
|
}
|
|
|
ln.add(new Notice(UUID.randomUUID().toString(), new Date(), 0, ub.getAid(),
|
|
|
NoticeStatus.CUSTOMER_LOSE_REMINDER.getCode(), str,ub.getUid()));
|
|
|
@@ -131,6 +133,7 @@ public class ReleaseUserTask {
|
|
|
userTmpList = customerService.selectWaitReleaseCustomer(u.getId(), 0);
|
|
|
// 获取270天释放
|
|
|
userTmpList2 = customerService.selectWaitReleaseCustomer(u.getId(), 1);
|
|
|
+ addUserNotice(userTmpList,userTmpList2);
|
|
|
//
|
|
|
customerService.pushReleaseLog(userTmpList, 0);
|
|
|
customerService.pushReleaseLog(userTmpList2, 1);
|
|
|
@@ -204,6 +207,23 @@ public class ReleaseUserTask {
|
|
|
LoggerUtils.debug(getClass(), "==============客户释放完成============");
|
|
|
}
|
|
|
|
|
|
+ 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()));
|
|
|
+ }
|
|
|
+ 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())noticeMapper.insertBatch(nl);
|
|
|
+ }
|
|
|
+
|
|
|
private void addChannelNotice(List<userDaysBo> hsList, List<userDaysBo> sfList) {
|
|
|
List<Notice> nl=new ArrayList<Notice>();
|
|
|
for (userDaysBo hs : hsList) {
|
|
|
@@ -219,7 +239,7 @@ public class ReleaseUserTask {
|
|
|
String.format("您的%s客户【%s】已经90天未跟进,已经自动释放!", "渠道", sf.getName()),
|
|
|
sf.getUid()));
|
|
|
}
|
|
|
- noticeMapper.insertBatch(nl);
|
|
|
+ if(!nl.isEmpty())noticeMapper.insertBatch(nl);
|
|
|
}
|
|
|
|
|
|
}
|