1
This commit is contained in:
@@ -220,7 +220,7 @@ public class JDUtils {
|
||||
/**
|
||||
* 一天拉取三次 30天到60天前的订单
|
||||
*/
|
||||
@Scheduled(cron = "0 0 */12 * * ?")
|
||||
@Scheduled(cron = "0 0 */4 * * ?")
|
||||
public void fetchHistoricalOrders3060() {
|
||||
|
||||
fetchHistoricalOrders3060Do();
|
||||
@@ -277,9 +277,8 @@ public class JDUtils {
|
||||
/**
|
||||
* 一天拉取6次 14天到30天前的订单
|
||||
*/
|
||||
@Scheduled(cron = "0 0 */4 * * ?")
|
||||
@Scheduled(cron = "0 0 * * * ?")
|
||||
public void fetchHistoricalOrders1430() {
|
||||
|
||||
fetchHistoricalOrders1430Do();
|
||||
}
|
||||
|
||||
@@ -333,7 +332,7 @@ public class JDUtils {
|
||||
/**
|
||||
* 每10分钟拉取07-14天的订单
|
||||
*/
|
||||
@Scheduled(cron = "0 0 */2 * * ?")
|
||||
@Scheduled(cron = "0 0 * * * ?")
|
||||
public void fetchHistoricalOrders0714() {
|
||||
|
||||
fetchHistoricalOrders0714Do();
|
||||
@@ -439,12 +438,13 @@ public class JDUtils {
|
||||
|
||||
/**
|
||||
* 根据指定的日期时间拉取订单
|
||||
*
|
||||
* @param startTime 开始时间
|
||||
* isRealTime 是否是实时订单 是的话不会判断是否拉取过
|
||||
* page 分页页码
|
||||
* isMinutes 是否是分钟级订单 分钟的每次加10分钟,小时每小时加1小时
|
||||
*/
|
||||
public UnionOpenOrderRowQueryResponse fetchOrdersForDateTime(LocalDateTime startTime, boolean isRealTime, Integer page, boolean isMinutes) {
|
||||
public synchronized UnionOpenOrderRowQueryResponse fetchOrdersForDateTime(LocalDateTime startTime, boolean isRealTime, Integer page, boolean isMinutes) {
|
||||
|
||||
LocalDateTime endTime = isMinutes ? startTime.plusMinutes(30) : startTime.plusHours(1);
|
||||
String hourMinuteTag = isRealTime ? "minute" : "hour";
|
||||
@@ -454,7 +454,7 @@ public class JDUtils {
|
||||
|
||||
// 检查这个小时或分钟是否已经被处理过
|
||||
if (hashOps.hasKey(timeTag, hourMinuteTag)) {
|
||||
if (!isMinutes){
|
||||
if (!isMinutes) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -474,7 +474,7 @@ public class JDUtils {
|
||||
|
||||
//logger.info("拉取订单---> ,类型 {} , 开始时间:{} --- 结束时间:{}", hourMinuteTag, startTime.format(DATE_TIME_FORMATTER), endTime.format(DATE_TIME_FORMATTER));
|
||||
return unionOpenOrderRowQueryResponse;
|
||||
}catch ( Exception e){
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user