admin
2019-02-25 8c66e480d8a3c129a9032a90d39688e875f45ee5
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
package com.yeshi.fanli.service.inter.user;
 
import java.util.List;
 
import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
import com.yeshi.fanli.entity.system.SystemCoupon;
import com.yeshi.fanli.exception.user.UserSystemCouponException;
import com.yeshi.fanli.vo.user.UserSystemCouponRecordVO;
import com.yeshi.fanli.vo.user.UserSystemCouponVO;
 
public interface UserSystemCouponService {
    public int insertSelective(UserSystemCoupon record);
 
    public UserSystemCoupon selectByPrimaryKey(Long id);
 
    public int updateByPrimaryKeySelective(UserSystemCoupon record);
 
    public int updateByPrimaryKey(UserSystemCoupon record);
 
    /**
     * 查询用户券列表 返回基础对象
     * @param start
     * @param count
     * @param uid
     * @return
     */
    public List<UserSystemCoupon> getUserCouponList(long start, int count, Long uid);
 
    /**
     * 查询用户券列表 返回VO对象
     * @param start
     * @param count
     * @param uid
     * @return
     */
    public List<UserSystemCouponVO> getUserCouponVOList(long start, int count, Long uid) throws UserSystemCouponException, Exception;
 
    /**
     * 统计数量
     * @param uid
     * @return
     */
    public long countUserCouponList(Long uid);
 
    /**
     *  券ID信息查询用户拥有券
     * @param uid
     * @param couponList
     * @return
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public List<UserSystemCouponVO> getEnableListByCouponId(Long uid,  Integer activated, List<SystemCoupon> couponList)
            throws UserSystemCouponException, Exception;
 
    /**
     * 查询订单使用相关券
     * @param uid
     * @return
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public List<UserSystemCouponVO> getOrderCouponList(Long uid) throws UserSystemCouponException, Exception;
 
    /**
     * 查询商品使用相关券
     * @param uid
     * @return
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public List<UserSystemCouponVO> getGoodsCouponList(Long uid) throws UserSystemCouponException, Exception;
 
    /**
     * 更新券使用记录
     * @param uid
     * @param id 
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public void useGoodsCoupon(Long uid, Long id, Long goodId) throws UserSystemCouponException, Exception;
    
    
    /**
     * 更新券使用记录
     * @param uid
     * @param id
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public void useOrderCoupon(Long uid, Long id, String orderNo) throws UserSystemCouponException, Exception;
 
    /**
     * 根据订单号获取奖励券使用进度
     * @param orderNo
     * @return 
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public UserSystemCouponRecordVO getRewardCouponRecord(String orderNo) throws UserSystemCouponException, Exception;
 
    /**
     * 是否存在奖励券
     * @param uid
     * @return
     */
    public boolean hasRewardCoupon(Long uid);
 
    /**
     * 根据订单号获取免单券使用进度
     * @param orderNo
     * @return
     * @throws UserSystemCouponException
     * @throws Exception
     */
    public UserSystemCouponRecordVO getFreeCouponRecord(String orderNo) throws UserSystemCouponException, Exception;
 
    
}