yujian
2020-06-29 ec60e757d358636dcac1589c44a66f3e276fe58c
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
package com.yeshi.fanli.dao.mybatis.money;
 
import java.math.BigDecimal;
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.money.TeamEincomeRecord;
 
public interface TeamEincomeRecordMapper extends BaseMapper<TeamEincomeRecord> {
 
    TeamEincomeRecord selectByUidAndPreRecieveTimeAndType(@Param("uid") Long uid,
            @Param("preRecieveTime") Date preRecieveTime, @Param("type") int type);
    
    
    TeamEincomeRecord selectByUidAndPreRecieveTimeAndTypeAndSourceType(@Param("uid") Long uid,
            @Param("preRecieveTime") Date preRecieveTime, @Param("type") int type, @Param("sourceType") Integer sourceType);
    
    
    
 
    TeamEincomeRecord selectByPrimaryKeyForUpdate(Long id);
 
    List<TeamEincomeRecord> listByUidAndPreRecieveTimeAndState(@Param("uid") Long uid,
            @Param("preRecieveTime") Date preRecieveTime, @Param("typeList") List<Integer> typeList,
            @Param("state") int state);
 
    public List<Long> listCanRecieveUid(@Param("preRecieveTime") Date preRecieveTime,
            @Param("typeList") List<Integer> typeList,@Param("start") long start,@Param("count")int count);
 
    public long countCanRecieveUid(@Param("preRecieveTime") Date preRecieveTime,
            @Param("typeList") List<Integer> typeList);
 
    
    /**
     * 统计类型已领取金额
     * @param uid
     * @param type
     * @return
     */
    BigDecimal sumRecieveByType(@Param("uid") Long uid,@Param("type") int type);
}