|
@@ -22,8 +22,8 @@ import com.goafanti.customer.service.CustomerService;
|
|
|
import com.goafanti.user.service.UserService;
|
|
import com.goafanti.user.service.UserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
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 javax.annotation.Resource;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
@@ -35,8 +35,8 @@ import java.util.List;
|
|
|
import java.util.UUID;
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
|
-@Component
|
|
|
|
|
-//@RestController
|
|
|
|
|
|
|
+//@Component
|
|
|
|
|
+@RestController
|
|
|
public class ReleaseUserTask {
|
|
public class ReleaseUserTask {
|
|
|
@Resource
|
|
@Resource
|
|
|
private CustomerService customerService;
|
|
private CustomerService customerService;
|
|
@@ -65,9 +65,9 @@ public class ReleaseUserTask {
|
|
|
* 客户释放
|
|
* 客户释放
|
|
|
*
|
|
*
|
|
|
*/
|
|
*/
|
|
|
-// @Scheduled(cron = "0 22 11 * * ?")
|
|
|
|
|
-// @RequestMapping("/open/test")
|
|
|
|
|
- @Scheduled(cron = "0 0 1 * * ?")
|
|
|
|
|
|
|
+// @Scheduled(cron = "0 23 9 * * ?")
|
|
|
|
|
+ @RequestMapping("/open/test")
|
|
|
|
|
+// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
public void startTask() {
|
|
public void startTask() {
|
|
|
try {
|
|
try {
|
|
|
List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
|
|
List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
|
|
@@ -238,6 +238,7 @@ public class ReleaseUserTask {
|
|
|
System.out.println(u.getId());
|
|
System.out.println(u.getId());
|
|
|
if (StringUtils.isNotBlank(u.getId())&&!AFTConstants.CAOJIN_AID.equals(u.getId())) {
|
|
if (StringUtils.isNotBlank(u.getId())&&!AFTConstants.CAOJIN_AID.equals(u.getId())) {
|
|
|
// 获取30天释放 释放以锁定表与user_mid最后跟进取时间
|
|
// 获取30天释放 释放以锁定表与user_mid最后跟进取时间
|
|
|
|
|
+
|
|
|
List<LockingReleaseBo> userTmpList = customerService.selectWaitReleaseCustomer(u.getId());
|
|
List<LockingReleaseBo> userTmpList = customerService.selectWaitReleaseCustomer(u.getId());
|
|
|
customerService.pushReleaseLog(userTmpList, 0);
|
|
customerService.pushReleaseLog(userTmpList, 0);
|
|
|
addUserNotice(userTmpList);
|
|
addUserNotice(userTmpList);
|