package com.ruoyi.jarvis.service;

import com.ruoyi.jarvis.domain.WeComShareLinkLogisticsJob;

import java.util.List;
import java.util.Map;

public interface IWeComShareLinkLogisticsJobService {

    WeComShareLinkLogisticsJob selectByJobKey(String jobKey);

    List<WeComShareLinkLogisticsJob> selectList(WeComShareLinkLogisticsJob query);

    /**
     * 从 wecom_inbound_trace 补录：reply 含「已加入查询队列」且能解析出 3.cn 短链。
     * jobKey 固定为 tracebf{traceId}，可重复执行跳过已存在项。
     */
    Map<String, Object> backfillImportedFromInboundTrace();

    List<WeComShareLinkLogisticsJob> selectRecentForInstruction(String remarkKeyword, int days, int limit);

    int deleteByJobKey(String jobKey);

    int deleteByRemarkAndTrackingUrl(String remark, String trackingUrl);
}
