Explorar o código

定时任务修改

anderx hai 1 ano
pai
achega
ea040989e6

+ 1 - 0
src/main/java/com/goafanti/common/mapper/UserLockReleaseMapper.xml

@@ -452,6 +452,7 @@
 	where  u.share_type in(0,2) and  u.channel=1
     and u.aid =#{aid}
 	and  datediff(now(),u.transfer_time)> #{y}
+    and  datediff(now(),u.transfer_time) < #{y}+15
   </select>
 
     <select id="selectChannelUserDays" resultType="com.goafanti.common.bo.userDaysBo">

+ 9 - 8
src/main/java/com/goafanti/common/task/ReleaseUserTask.java

@@ -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);

+ 4 - 4
src/main/resources/props/config_local.properties

@@ -1,8 +1,8 @@
 dev.name=local
 jdbc.driverClassName=com.mysql.jdbc.Driver
 
-#static.host=//static.jishutao.com/1.3.15
-static.host=//172.16.1.187/1.3.15
+static.host=//static.jishutao.com/1.3.16
+#static.host=//172.16.1.187/1.3.15
 
 #jdbc.url=jdbc\:mysql://localhost:3306/aft20240430?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
 #jdbc.url=jdbc\:mysql://localhost:3306/aft?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
@@ -56,9 +56,9 @@ yxjl_max=100
 amb.maxLvl=6
 
 
-avatar.host=//172.16.1.199:3000
+#avatar.host=//172.16.1.199:3000
 #static.host=//172.16.0.255:3000/1.2.62
-#avatar.host=//static.jishutao.com
+avatar.host=//static.jishutao.com
 rd.static.host=//static.jishutao.com/RD/1.0.03
 
 #\u5FAE\u4FE1\u6253\u5361\u5C0F\u7A0B\u5E8F