admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
package com.yeshi.fanli.service.inter.user;
 
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
 
import org.springframework.web.multipart.MultipartFile;
 
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.exception.user.UserInfoException;
import com.yeshi.fanli.vo.user.UserInfoVO;
 
public interface UserInfoService {
    /**
     * 通过openid和loginType,获取用户
     * 
     * @param loginType
     *            1:阿里系列(淘宝)账户
     * @param openid
     *            :登录淘宝后得到的openid
     * @param appid
     * @return 用户,如果不存在返回null
     */
    public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid);
 
    /**
     * 添加用户
     * 
     * @param form
     *            用户信息
     * @return 用户,添加失败返回null
     */
    public UserInfo addUser(UserInfo form, String appid);
 
    /**
     * 通过用户id获取用户
     * 
     * @param uid
     *            用户id
     * @return 用户
     */
    public UserInfo getUserById(long uid);
 
    /**
     * Mybatis通过用户ID获取用户信息
     * 
     * @param uid
     * @return
     */
    public UserInfo getUserByIdWithMybatis(long uid);
 
    public void update(UserInfo user);
 
    public long getUserCount();
 
 
    public void unBindUserInfo(UserInfo find, int type);
 
    public void addMoney(UserInfo userInfo, BigDecimal money);
 
    public boolean createUser(UserInfo form, String appid);
 
    public void updateLoginInfo(UserInfo user);
 
    public void cleanPassword(long id);
 
    public BigDecimal getNewPeopleHB(Long id);
 
    /**
     * 查询用户信息 -- 用户管理列表
     * 
     * @param start
     * @param count
     * @param key
     * @param userType
     * @param days
     * @param startTime
     * @param endTime
     * @param orderMode
     * @return
     */
    public List<UserInfoVO> query(long start, int count, Integer userState, String key, Integer keyType,
            String userRank, Integer days, String startTime, String endTime, Integer orderField, Integer orderMode,
            Integer userType, String level, Integer activeCode);
 
    public long queryCount(Integer userState, String key, Integer keyType, String userRank, Integer days,
            String startTime, String endTime, Integer userType, String level, Integer activeCode);
 
    public double querySumMoney(String key, Integer userType, Integer days, String startTime, String endTime);
 
    /**
     * 选择性更新
     * 
     * @param record
     * @return
     */
    public int updateByPrimaryKeySelective(UserInfo record);
 
    /**
     * 其强制删除绑定信息
     * 
     * @param user
     * @param type
     */
    public void deleteBindInfo(UserInfo user, int type);
 
    /**
     * 根据id查询用户信息
     * 
     * @param id
     * @return
     */
    public UserInfo selectByPKey(Long id);
 
    /**
     * 超过 daysNum 天未登陆的用户
     * 
     * @param daysNum
     * @param list
     * @return
     */
    public List<Long> longTimeNoLogin(int daysNum, List<Long> list);
 
    /**
     * 根据邀请码获取邀请用户
     * 
     * @param inviteCode
     * @return
     */
    public UserInfo getUserInfoByInviteCode(String inviteCode);
 
    /**
     * 根据电话号码 获取有效用户
     * 
     * @param phone
     * @return
     */
    public UserInfo getEffectiveUserInfoByPhone(String phone);
 
    /**
     * 获取用户信息
     * 
     * @param uid
     * @return
     * @throws UserInfoException
     */
    public UserInfo getUserInfo(Long uid) throws UserInfoException;
 
    /**
     * 根据微信获取有效用户
     * 
     * @param unionId
     * @return
     */
    public UserInfo getEffectiveUserInfoByWXUnionId(String unionId);
 
    /**
     * 获取用户余额
     * 
     * @param uid
     * @return
     */
    public BigDecimal getBalance(Long uid);
 
    /**
     * 更换头像
     * 
     * @param file
     * @param uid
     * @throws UserInfoException
     * @throws IOException
     */
    public void uploadPortrait(MultipartFile file, Long uid) throws UserInfoException, IOException;
 
    /**
     * 保存头像
     * 
     * @param nickName
     * @param uid
     * @throws UserInfoException
     */
    public void saveUserInfo(String nickName, Long uid) throws UserInfoException;
 
    /**
     * 获取可提现用户列表
     * 
     * @param page
     * @param count
     */
    public List<UserInfo> getAutoExtractUser(int page, int count, BigDecimal minSurplus, String beganDate,
            String endDate);
 
    /**
     * 根据类型获取
     * 
     * @param type
     * @param page
     * @param count
     * @return
     */
    public List<UserInfo> listByType(int type, int page, int count);
 
    /**
     * 根据类型计数
     * 
     * @param type
     * @return
     */
    public long countByType(int type);
 
    /**
     * 双12预售开启时,开启对休眠老用户的唤醒工作,在2019.1.1到2019.6.18期间产生过订单,并且2019.6.18号后未再活跃,
     * 并且账户余额大于1元,并且绑定了微信的用户有2468人
     * 
     * @param start
     * @param count
     * @return
     */
    public List<UserInfo> getAutoExtractUserTo1212(int start, int count);
 
    /**
     * 根据用户ID检索
     * 
     * @param uid
     * @return
     */
    public UserInfo selectAvailableByPrimaryKey(Long uid);
 
 
 
}