42 lines
1.8 KiB
Java
42 lines
1.8 KiB
Java
package com.ruoyi.jarvis.mapper;
|
||
|
||
import com.ruoyi.jarvis.domain.WeComShareLinkLogisticsJob;
|
||
import org.apache.ibatis.annotations.Param;
|
||
|
||
import java.util.List;
|
||
|
||
public interface WeComShareLinkLogisticsJobMapper {
|
||
|
||
int insertWeComShareLinkLogisticsJob(WeComShareLinkLogisticsJob job);
|
||
|
||
int updateByJobKey(@Param("jobKey") String jobKey,
|
||
@Param("status") String status,
|
||
@Param("lastNote") String lastNote,
|
||
@Param("scanAttempts") Integer scanAttempts,
|
||
@Param("waybillNo") String waybillNo);
|
||
|
||
WeComShareLinkLogisticsJob selectByJobKey(String jobKey);
|
||
|
||
List<WeComShareLinkLogisticsJob> selectWeComShareLinkLogisticsJobList(WeComShareLinkLogisticsJob query);
|
||
|
||
/**
|
||
* 待自动扫描但可能未在 Redis 队列中的任务(如纯 SQL 补录的 IMPORTED、入队失败后的 PENDING 等)。
|
||
* 含曾 {@code ABANDONED} 的任务(对账时会先归零扫描次数并改回 {@code WAITING} 再入队)。
|
||
* 仅 {@code create_time} 在最近一个月内的记录,避免扫到过旧历史。
|
||
*/
|
||
List<WeComShareLinkLogisticsJob> selectJobsNeedingQueueReconcile(@Param("limit") int limit);
|
||
|
||
int deleteByJobKey(@Param("jobKey") String jobKey);
|
||
|
||
/**
|
||
* 机器人「京外物列表」:最近若干天内的任务,按 id 倒序,可选备注子串筛选。
|
||
*/
|
||
List<WeComShareLinkLogisticsJob> selectRecentForInstruction(@Param("remarkKeyword") String remarkKeyword,
|
||
@Param("days") int days, @Param("limit") int limit);
|
||
|
||
/**
|
||
* 机器人「京外物删」:按备注与短链精确匹配(trim)物理删除,返回删除行数。
|
||
*/
|
||
int deleteByRemarkAndTrackingUrl(@Param("remark") String remark, @Param("trackingUrl") String trackingUrl);
|
||
}
|