|
|
@@ -36,6 +36,7 @@ public class ReleaseUserTask {
|
|
|
@Scheduled(cron = "0 0 1 * * ?")
|
|
|
// @RequestMapping(value = "/open/updateUser", method = RequestMethod.GET)
|
|
|
public void updateUser(){
|
|
|
+ LoggerUtils.debug(getClass(), "==============客户释放开始============");
|
|
|
Date releaseTime = new Date();
|
|
|
try {
|
|
|
List<User> userList = userServiceImpl.selectUserByRoleName("营销员","营销经理");
|
|
|
@@ -43,15 +44,18 @@ public class ReleaseUserTask {
|
|
|
List<LockingReleaseBo> lockBusinessList = new ArrayList<LockingReleaseBo>();
|
|
|
List<LockingReleaseBo> userTmpList = null;
|
|
|
List<LockingReleaseBo> businessTmpList = null;
|
|
|
- for(User u : userList){
|
|
|
- if(StringUtils.isNotBlank(u.getId())) {
|
|
|
- userTmpList = customerServiceImpl.selectWaitReleaseCustomer(u.getId());
|
|
|
+ if (userList!=null&&!userList.isEmpty()) {
|
|
|
+ for(User u : userList){
|
|
|
+ if(StringUtils.isNotBlank(u.getId())) {
|
|
|
+ userTmpList = customerServiceImpl.selectWaitReleaseCustomer(u.getId());
|
|
|
// userTmpList = customerServiceImpl.selectWaitReleaseCustomer("1");
|
|
|
- lockUserList.addAll(userTmpList);
|
|
|
- businessTmpList = customerServiceImpl.selectWaitReleaseBusiness(u.getId());
|
|
|
+ lockUserList.addAll(userTmpList);
|
|
|
+ businessTmpList = customerServiceImpl.selectWaitReleaseBusiness(u.getId());
|
|
|
// businessTmpList = customerServiceImpl.selectWaitReleaseBusiness("1");
|
|
|
- lockBusinessList.addAll(businessTmpList);
|
|
|
+ lockBusinessList.addAll(businessTmpList);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
List<LockingReleaseBo> newList=new ArrayList<LockingReleaseBo>();
|
|
|
if (lockUserList.size()>0) {
|
|
|
@@ -91,6 +95,7 @@ public class ReleaseUserTask {
|
|
|
LoggerUtils.error(getClass(), "客户释放失败", e);
|
|
|
LoggerUtils.error(getClass(), "=============================================");
|
|
|
}
|
|
|
+ LoggerUtils.debug(getClass(), "==============客户释放完成============");
|
|
|
}
|
|
|
|
|
|
}
|