喻健
2018-12-25 95654e5a5a1d0c4384cf44a1510c670ec804abc7
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
package com.yeshi.fanli.service.inter.order;
 
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
 
import com.yeshi.fanli.entity.order.CommonOrder;
import com.yeshi.fanli.exception.order.CommonOrderException;
import com.yeshi.fanli.vo.order.CommonOrderVO;
 
public interface CommonOrderService {
 
    public int insert(CommonOrder record);
 
    public int insertSelective(CommonOrder record);
 
    public int updateByPrimaryKey(CommonOrder record);
    
    public int updateByPrimaryKeySelective(CommonOrder record);
    
    public int deleteByPrimaryKey(Long id);
    
    public CommonOrder selectByPrimaryKey(Long id);
 
 
    /**
     * 查询用户订单 并订单号分组
     * @param start
     * @param count
     * @param uid
     * @param state
     * @param type
     * @param orderNo 订单号
     * @param startTime 起始系统录入时间
     * @param endTime  结束系统录入时间
     * @return
     * @throws CommonOrderException
     */
    public List<CommonOrderVO> listGroupOrderNoByUid(long start, int count, Long uid, Integer state, Integer type,
            String orderNo, String startTime, String endTime) throws CommonOrderException;
 
    /**
     * 统计查询
     * @param uid
     * @param state
     * @param type
     * @param orderNo
     * @param startTime
     * @param endTime
     * @return
     * @throws CommonOrderException
     */
    long countGroupOrderNoByUid(Long uid, Integer state, Integer type, String orderNo, String startTime, String endTime)
            throws CommonOrderException;
    
    /**
     * 移动段订单列表
     * @param start
     * @param count
     * @param uid 用户id
     * @param type 到账状态
     * @return
     */
    public List<CommonOrderVO> getOrderByUid(Long page, Long uid, Integer state, Integer type,
            String orderNo, String startTime, String endTime) throws CommonOrderException;
 
    /**
     * 统计订单-根据红包类型 自购 邀请 分享
     * @param uid
     * @return
     */
    public Map<String, BigDecimal> countOrderByHongBaoType(Long uid, Integer day);
    
    
    /**
     * 统计订单
     * @param uid
     * @return
     */
    public long countOrder(Long uid, Integer isToday);
    
    /**
     * 统计订单
     * @param uid
     * @return
     */
    public BigDecimal countOrderMoney(Long uid, Integer isToday);
 
    /**
     * 根据条件统计
     * @param uid
     * @param type
     * @param startTime
     * @param endTime
     * @return
     */
    public Map<String, BigDecimal> countByUidAndOrderState(Long uid, Integer type, String startTime, String endTime);
 
}