|
|
@@ -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;
|
|
|
@@ -35,8 +35,8 @@ import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
-@Component
|
|
|
-//@RestController
|
|
|
+//@Component
|
|
|
+@RestController
|
|
|
public class ReleaseUserTask {
|
|
|
@Resource
|
|
|
private CustomerService customerService;
|
|
|
@@ -66,20 +66,19 @@ public class ReleaseUserTask {
|
|
|
*
|
|
|
*/
|
|
|
// @Scheduled(cron = "0 23 9 * * ?")
|
|
|
-// @RequestMapping("/open/test")
|
|
|
- @Scheduled(cron = "0 0 1 * * ?")
|
|
|
+ @RequestMapping("/open/test")
|
|
|
+// @Scheduled(cron = "0 0 1 * * ?")
|
|
|
public void startTask() {
|
|
|
try {
|
|
|
List<User> userList = userService.selectUserByRoleName("营销员", "营销经理");
|
|
|
pushUserDays(userList);
|
|
|
- Thread.sleep(2000);
|
|
|
- updateUser(userList);
|
|
|
- Thread.sleep(2000);
|
|
|
- pushRestrictProject(userList);
|
|
|
+// Thread.sleep(2000);
|
|
|
+// updateUser(userList);
|
|
|
+// Thread.sleep(2000);
|
|
|
+// pushRestrictProject(userList);
|
|
|
} catch (InterruptedException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -190,8 +189,9 @@ public class ReleaseUserTask {
|
|
|
List<Notice> ln = new ArrayList<>();
|
|
|
List<userDaysBo> userChannelList = new ArrayList<userDaysBo>();
|
|
|
for (User u : userList) {
|
|
|
- if (StringUtils.isNotBlank(u.getId())&&AFTConstants.CAOJIN_AID.equals(u.getId())) {
|
|
|
- List<userDaysBo> userTmpList = customerService.selectReleaseUserDays(u.getId());
|
|
|
+ String uid=u.getId();
|
|
|
+ if (StringUtils.isNotBlank(uid)&&!AFTConstants.CAOJIN_AID.equals(uid)) {
|
|
|
+ List<userDaysBo> userTmpList = customerService.selectReleaseUserDays(uid);
|
|
|
for (userDaysBo ub : userTmpList) {
|
|
|
String str=null;
|
|
|
if (ub.getChannel() == 0) {
|
|
|
@@ -238,7 +238,6 @@ public class ReleaseUserTask {
|
|
|
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);
|
|
|
addUserNotice(userTmpList);
|