package com.ruoyi.jarvis.service; import com.alibaba.fastjson2.JSONObject; import com.ruoyi.jarvis.domain.ErpGoofishOrder; import com.ruoyi.jarvis.domain.ErpGoofishOrderEventLog; import java.util.List; public interface IErpGoofishOrderService { void publishOrProcessNotify(String appid, Long timestamp, JSONObject body); /** * MQ 消费者或线程池:写库、拉详情、关联京东单、同步运单、尝试发货 */ void asyncPipelineAfterNotify(String appid, JSONObject notifyBody); List selectList(ErpGoofishOrder query); ErpGoofishOrder selectById(Long id); int pullOrdersForAppKey(String appKey, int lookbackHours); int pullAllEnabled(int lookbackHours); /** 按配置的起始天数 + 时间分段,尽量拉全历史订单(update_time) */ int pullOrdersForAppKeyFullHistory(String appKey); int pullAllEnabledFullHistory(); void refreshDetail(Long id); void retryShip(Long id); int syncWaybillAndTryShipBatch(int limit); void applyListOrNotifyItem(String appKey, JSONObject item, String lastNotifyJson); /** * 京东单物流扫描已得到运单号并写入 Redis 后调用:同步到闲鱼单并尝试开放平台发货。 */ void notifyJdWaybillReady(Long jdOrderId); /** 订单状态 / 物流 / 发货 变更日志(新→旧) */ List listEventLogsByOrderId(Long orderId); }