From 5e7b0ed4a154ad067cbcf4aa1a1c7cce32f9864c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 26 四月 2024 18:02:17 +0800 Subject: [PATCH] 唯品会链接解析升级 --- fanli/src/main/java/com/yeshi/fanli/job/order/pdd/UpdatePDDOrderJob.java | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/job/order/pdd/UpdatePDDOrderJob.java b/fanli/src/main/java/com/yeshi/fanli/job/order/pdd/UpdatePDDOrderJob.java index 542ac81..63a6133 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/order/pdd/UpdatePDDOrderJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/order/pdd/UpdatePDDOrderJob.java @@ -6,7 +6,9 @@ import javax.annotation.Resource; +import com.yeshi.fanli.dto.mq.order.body.CommonOrderMQMsg; import com.yeshi.fanli.util.Constant; +import com.yeshi.fanli.util.mq.cmq.order.OrdersCMQManager; import org.springframework.stereotype.Component; import com.xxl.job.core.biz.model.ReturnT; @@ -33,7 +35,7 @@ /** * 淇濆瓨璁㈠崟 * - * @param jdOrderList + * @param orderList */ public void savePDDOrders(List<PDDOrder> orderList) { //5鍒嗛挓涓嶆洿鏂板氨鎶ヨ @@ -55,7 +57,8 @@ String result = redisManager.getCommonString(key); // if (!StringUtil.isNullOrEmpty(result)) // continue; - PDDOrderCMQManager.getInstance().addPDDOrder(order.getOrderSn() + ""); + OrdersCMQManager.getInstance().addOrder(new CommonOrderMQMsg(order.getOrderSn() + "",Constant.SOURCE_TYPE_PDD)); + redisManager.cacheCommonString(key, "1", 60 * 60 * 2);// 2灏忔椂鍐呬笉鍐嶆洿鏂� } catch (PDDOrderException e) { e.printStackTrace(); @@ -97,8 +100,14 @@ */ // @Scheduled(cron = "0 0/30 * * * ? ") public void updateUpdateOrder() { + long endTime = System.currentTimeMillis() - 1000 * 60 * 60L; - long startTime = System.currentTimeMillis() - 1000 * 60 * 60 * 24L; + long startTime = System.currentTimeMillis() - 1000 * 60 * 60 * 24L ; + + updateUpdateOrder(startTime,endTime); + } + + public void updateUpdateOrder(long startTime,long endTime) { int page = 1; List<PDDOrder> pddOrderList = new ArrayList<>(); PDDOrderResult result = PinDuoDuoApiUtil.getOrdersList(page++, 50, startTime, endTime); -- Gitblit v1.8.0