admin
2019-01-05 374fa38b5e4c17c079e027e9987e966f30a5cd36
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
package com.yeshi.fanli.dao.mybatis;
 
import java.math.BigDecimal;
import java.util.List;
 
import org.apache.ibatis.annotations.Param;
 
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.dto.HongBaoDTO;
import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 
public interface HongBaoV2Mapper extends BaseMapper<HongBaoV2> {
 
    HongBaoV2 selectByPrimaryKeyForUpdate(Long id);
 
    /**
     * 获取子红包列表
     * 
     * @param id
     * @return
     */
    List<HongBaoV2> listChildrenById(Long id);
 
    /**
     * 获取奖金列表(1.4.9之前)
     * 
     * @param uid
     * @param start
     * @param count
     * @return
     */
    List<HongBaoDTO> listJiangJinByUid(@Param("uid") Long uid, @Param("start") long start, @Param("count") int count);
 
    /**
     * 获取奖金数量(1.4.9之前)
     * 
     * @param uid
     * @return
     */
    Long countJiangJinByUid(Long uid);
 
    /**
     * 获取总的提成金额
     * 
     * @param uid
     * @return
     */
    BigDecimal getTotalTiChengMoney(Long uid);
 
    /**
     * 获取总的提成笔数
     * 
     * @param uid
     * @return
     */
    int getTotalTiChengCount(Long uid);
 
    /**
     * 获取还未到账的提成金额
     * 
     * @param uid
     * @return
     */
    BigDecimal getUnGetTiChengMoney(Long uid);
 
    /**
     * 获取总共返利金额
     * 
     * @param uid
     * @return
     */
    BigDecimal getTotalFanLiMoney(Long uid);
 
    /**
     * 获取还未到账的金额
     * 
     * @param uid
     * @return
     */
    BigDecimal getUnRecievedFanLiMoney(Long uid);
 
    /**
     * 根据红包类型获取结算列表
     * 
     * @param type
     * @param count
     * @return
     */
    List<HongBaoV2> listCanBalanceHongBaoByType(@Param("type") int type, @Param("count") int count);
 
    /**
     * 获取能够结算的分享赚和邀请赚的用户列表
     * 
     * @param count
     * @return
     */
    List<Long> listUidCanBanlanceShareAndInvite(int count);
 
    /**
     * 根据用户ID,类型获取能够结算的红包
     * 
     * @param type
     * @param uid
     * @param count
     * @return
     */
    List<HongBaoV2> listCanBalanceHongBaoByTypeAndUid(@Param("types") List<Integer> type, @Param("uid") Long uid,
            @Param("count") int count);
 
}