admin
2020-03-23 e4ee46557cffc21be597d017a0d16f8e310f6077
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package com.yeshi.fanli.dao.mybatis.order;
 
import java.util.Date;
import java.util.List;
 
import org.apache.ibatis.annotations.Param;
 
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.order.OrderTeamReward;
 
public interface OrderTeamRewardMapper extends BaseMapper<OrderTeamReward> {
 
    /**
     * 查询用户补贴
     * 
     * @param uid
     * @param orderNo
     * @param Type
     * @return
     */
    OrderTeamReward getByOrderNoAndType(@Param("uid") Long uid, @Param("orderNo") String orderNo,
            @Param("type") Integer type);
 
    /**
     * 查询加锁
     * 
     * @param uid
     * @param orderNo
     * @param type
     * @return
     */
    OrderTeamReward getByOrderNoAndTypeForUpdate(@Param("uid") Long uid, @Param("orderNo") String orderNo,
            @Param("type") Integer type);
 
    /**
     * 根据订单号与来源类型查询
     * 
     * @param orderNo
     * @param type
     * @return
     */
    long countByOrderNoAndType(@Param("orderNo") String orderNo, @Param("type") Integer type);
 
    /**
     * 根据订单号与来源类型查询
     * 
     * @param orderNo
     * @param type
     * @return
     */
    List<OrderTeamReward> listByOrderNoAndType(@Param("orderNo") String orderNo, @Param("type") Integer type);
 
    /**
     * 根据补贴与用户ID查询
     * @Title: selectBySubsidyIdAndUid
     * @Description: 
     * @param subsidyId
     * @param uid
     * @return 
     * OrderTeamReward 返回类型
     * @throws
     */
    OrderTeamReward selectBySubsidyIdAndUidForUpdate(@Param("subsidyId") Long subsidyId, @Param("uid") Long uid);
 
    /**
     * 根据补贴ID查询
     * @Title: listBySubsidyId
     * @Description: 
     * @param subsidyId
     * @return 
     * List<OrderTeamReward> 返回类型
     * @throws
     */
    List<OrderTeamReward> listBySubsidyId(Long subsidyId);
 
    /**
     * 通过用户ID查询可以结算的奖励列表
     * @Title: listCanSettleByUid
     * @Description: 
     * @param uid
     * @param page
     * @param pageSize
     * @return 
     * List<OrderTeamReward> 返回类型
     * @throws
     */
    List<OrderTeamReward> listCanSettleByUid(@Param("uid") Long uid, @Param("start") long start,
            @Param("count") int count);
 
    /**
     * 通过用户ID统计可以结算的奖励数量
     * @Title: countCanSettle
     * @Description: 
     * @param uid
     * @return 
     * long 返回类型
     * @throws
     */
    long countCanSettle(@Param("uid") Long uid);
 
    /**
     * 获取某个时间点可以结算的用户ID列表
     * @Title: listCanSettleUid
     * @Description: 
     * @param time
     * @param start
     * @param count
     * @return 
     * List<Long> 返回类型
     * @throws
     */
    List<Long> listCanSettleUid( @Param("time") Date time, @Param("start") long start, @Param("count") int count);
 
    /**
     * 获取某个时间点可以结算的用户数量
     * @Title: countCanSettleUid
     * @Description: 
     * @param time
     * @return 
     * Long 返回类型
     * @throws
     */
    Long countCanSettleUid(Date time);
}