admin
2022-04-29 6cc97918a5a42e37a3c3867cc5b78a0b9fd43a24
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
package com.yeshi.makemoney.app.service.inter.goldcorn;
 
import com.yeshi.makemoney.app.dto.goldcorn.GoldCornMakeResultDTO;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord;
import com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetType;
import com.yeshi.makemoney.app.entity.user.UserInfo;
import com.yeshi.makemoney.app.exception.goldcorn.GoldCornGetFrequencyConfigException;
import com.yeshi.makemoney.app.exception.goldcorn.GoldCornGetPriceException;
import com.yeshi.makemoney.app.exception.goldcorn.GoldCornGetRecordException;
import com.yeshi.makemoney.app.exception.goldcorn.GoldCornMakeException;
import com.yeshi.makemoney.app.exception.user.UserInfoException;
 
import java.util.Date;
 
/**
 * @author hxh
 * @title: GoldCornGetService
 * @description:赚取金币服务
 * @date 2022/4/6 16:53
 */
public interface GoldCornMakeService {
 
    /**
     * @return void
     * @author hxh
     * @description 添加金币
     * @date 16:55 2022/4/6
     * @param: uid 用户ID
     * @param: type 类型
     * @param: isDouble 是否加倍
     * @param: time 发生时间
     **/
    public GoldCornGetRecord addGoldCorn(Long uid, GoldCornGetType type, boolean isDouble, Date time, Integer price, Long eventCount) throws UserInfoException, GoldCornGetFrequencyConfigException, GoldCornMakeException;
 
 
    /**
     * @return java.lang.Long
     * @author hxh
     * @description 根据日期计算金币
     * @date 18:43 2022/4/6
     * @param: uid
     * @param: day
     **/
    public Long getGoldCornByDay(Long uid, Date day);
 
 
    /**
     * @return java.lang.Long
     * @author hxh
     * @description 获取正在折算中的金币数量
     * @date 11:21 2022/4/21
     * @param: uid
     **/
    public Long getExchangingGoldCorn(Long uid, int dayCount);
 
    /**
     * @return int
     * @author hxh
     * @description 获取连续签到的天数
     * @date 16:24 2022/4/21
     * @param: uid
     **/
    public int getContinueSignDay(Long uid);
 
 
    /**
     * @return boolean
     * @author hxh
     * @description 是否签到
     * @date 17:05 2022/4/21
     * @param: uid
     * @param: date
     **/
    public boolean isSignIn(Long uid, Date date);
 
    public long frequencyVerify(UserInfo user, GoldCornGetType type, Date time) throws GoldCornGetFrequencyConfigException, GoldCornMakeException;
 
 
    /**
     * @return com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord
     * @author hxh
     * @description 签到
     * @date 19:14 2022/4/21
     * @param: uid
     **/
    public GoldCornGetRecord signIn(Long uid) throws GoldCornGetFrequencyConfigException, UserInfoException, GoldCornGetPriceException, GoldCornMakeException;
 
 
    /**
     * @return com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord
     * @author hxh
     * @description 观看视频
     * @date 18:47 2022/4/26
     * @param: uid
     * @param: isDouble
     * @param: time
     * @param: timeSeconds
     **/
    public GoldCornMakeResultDTO watchVideo(Long uid, boolean isDouble, Date time, long timeSeconds) throws GoldCornGetPriceException, UserInfoException, GoldCornMakeException, GoldCornGetFrequencyConfigException;
 
 
    /**
     * @return com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord
     * @author hxh
     * @description 阅读小说
     * @date 18:48 2022/4/26
     * @param: uid
     * @param: isDouble
     * @param: time
     * @param: timeSeconds
     **/
    public GoldCornMakeResultDTO readNovel(Long uid, boolean isDouble, Date time, long timeSeconds) throws GoldCornGetPriceException, UserInfoException, GoldCornMakeException, GoldCornGetFrequencyConfigException;
 
 
    /**
     * @return com.yeshi.makemoney.app.entity.goldcorn.GoldCornGetRecord
     * @author hxh
     * @description 浏览资讯
     * @date 18:48 2022/4/26
     * @param: uid
     * @param: isDouble
     * @param: time
     * @param: num
     **/
    public GoldCornMakeResultDTO scanNews(Long uid, boolean isDouble, Date time, int num) throws GoldCornGetPriceException, UserInfoException, GoldCornMakeException, GoldCornGetFrequencyConfigException;
 
 
    /**
     * @return com.yeshi.makemoney.app.dto.goldcorn.GoldCornMakeResultDTO
     * @author hxh
     * @description /邀请好友
     * @date 18:55 2022/4/28
     * @param: uid
     * @param: friendInfo
     * @param: time
     **/
    public GoldCornMakeResultDTO inviteFriends(Long uid, UserInfo friendInfo, Date time) throws UserInfoException, GoldCornGetPriceException, GoldCornMakeException, GoldCornGetFrequencyConfigException;
 
 
    /**
     * @author hxh 
     * @description 提现
     * @date 18:55 2022/4/28
     * @param: uid
     * @param: time
     * @return com.yeshi.makemoney.app.dto.goldcorn.GoldCornMakeResultDTO
     **/
    public GoldCornMakeResultDTO extract(Long uid, Date time) throws UserInfoException, GoldCornGetPriceException, GoldCornMakeException, GoldCornGetFrequencyConfigException;
 
}