|
|
@@ -22,8 +22,8 @@ import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.scheduling.annotation.Scheduled;
|
|
|
-import org.springframework.stereotype.Component;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
|
@@ -32,8 +32,8 @@ import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
-@Component
|
|
|
-//@RestController
|
|
|
+//@Component
|
|
|
+@RestController
|
|
|
public class ReleaseUserTask {
|
|
|
@Resource
|
|
|
private CustomerService customerService;
|
|
|
@@ -59,11 +59,11 @@ public class ReleaseUserTask {
|
|
|
private UserTransferLogMapper userTransferLogMapper;
|
|
|
|
|
|
/**
|
|
|
- * 每天凌晨一点
|
|
|
+ * 客户释放
|
|
|
*
|
|
|
*/
|
|
|
- @Scheduled(cron = "0 11 10 * * ?")
|
|
|
-// @RequestMapping("/open/test")
|
|
|
+// @Scheduled(cron = "0 22 11 * * ?")
|
|
|
+ @RequestMapping("/open/test")
|
|
|
// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
public void startTask() {
|
|
|
try {
|
|
|
@@ -232,7 +232,8 @@ public class ReleaseUserTask {
|
|
|
List<LockingReleaseBo> lockUserList = new ArrayList<LockingReleaseBo>();
|
|
|
if (userList != null && !userList.isEmpty()) {
|
|
|
for (User u : userList) {
|
|
|
- if (StringUtils.isNotBlank(u.getId())&&AFTConstants.CAOJIN_AID.equals(u.getId())) {
|
|
|
+ System.out.println(u.getId());
|
|
|
+ if (StringUtils.isNotBlank(u.getId())&&!AFTConstants.CAOJIN_AID.equals(u.getId())) {
|
|
|
// 获取30天释放 释放以锁定表与user_mid最后跟进取时间
|
|
|
List<LockingReleaseBo> userTmpList = customerService.selectWaitReleaseCustomer(u.getId());
|
|
|
customerService.pushReleaseLog(userTmpList, 0);
|