admin
2025-08-08 035edfa382d349ba66240fbfef68c14c7cfc95d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.taoke.autopay.dao;
 
import com.taoke.autopay.dto.js2.ClientCountDTO;
import com.taoke.autopay.entity.js2.OrderTaskExecutionDetail;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
import org.yeshi.utils.mybatis.BaseMapper;
 
public interface OrderTaskExecutionDetailMapper extends BaseMapper<OrderTaskExecutionDetail> {
 
    OrderTaskExecutionDetail selectByPrimaryKey(@Param("id") String id);
    
    OrderTaskExecutionDetail selectByPrimaryKeyForUpdate(@Param("id") String id);
    
    int deleteByPrimaryKey(@Param("id") String id);
 
    List<OrderTaskExecutionDetail> list(@Param("query") DaoQuery query);
 
    List<OrderTaskExecutionDetail> listByIds(@Param("ids") List<String> ids);
 
    long count(@Param("query") DaoQuery query);
 
    /**
     * 可执行的任务详情列表
     * @param clientId
     * @param minCreateTime
     * @return
     */
    List<OrderTaskExecutionDetail> listCanExcuteTaskDetail(@Param("clientId") Long clientId,@Param("minCreateTime") Date minCreateTime,@Param("start") long start,@Param("count") int count);
 
    long countCanExcuteTaskDetail(@Param("clientId") Long clientId,@Param("minCreateTime") Date minCreateTime);
 
    /**
     * 根据执行状态分组统计clientId的数量
     * @return 包含执行状态和对应clientId数量的映射列表
     */
    List<ClientCountDTO> statisticClientIdsCountByStatus(@Param("statusList") List<Integer> statusList);
 
    public static class DaoQuery{
        public String id;
        public Long taskId;
        public Long clientId;
        public Integer executionStatus;
        public String statusDescription;
        public String orderNo;
        public String productName;
        public String shopName;
        public String couponCode;
        public Date orderTime;
        public Date receiveTime;
        public Date reviewTime;
        public Date minCreateTime;
        public Date maxCreateTime;
        public Date minUpdateTime;
        public Date maxUpdateTime;
        public long start;
        public int count;
        public List<String> sortList;
    }
}