puzhibing
2023-03-15 79962435853baf5a28e08461f46a831fffa1a4b0
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
package com.stylefeng.guns.modular.system.service;
 
import com.baomidou.mybatisplus.service.IService;
import com.stylefeng.guns.modular.system.model.UserInfo;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.warpper.LoginWarpper;
 
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.Map;
 
public interface IUserInfoService extends IService<UserInfo> {
 
 
    /**
     * 获取短信验证码
     * @param phone
     * @return
     */
    ResultUtil queryCaptcha(String phone, Integer type) throws Exception;
 
 
    /**
     * 校验短信验证码
     * @param phone
     * @param code
     * @return
     * @throws Exception
     */
    boolean checkCaptcha(String phone, String code) throws Exception;
 
 
    /**
     * 手机验证码登录
     * @param phone
     * @param code
     * @return
     */
    ResultUtil<LoginWarpper> captchaLogin(String phone, String code, String registIp, String registAreaCode,String loginType) throws Exception;
 
    /**
     * 手机一键登录
     * @param accessToken
     * @param registIp
     * @param registAreaCode
     * @return
     * @throws Exception
     */
    ResultUtil<LoginWarpper> oneClickLogin(String accessToken, String registIp, String registAreaCode,String loginType,String androidOrIos) throws Exception;
 
 
 
    ResultUtil<LoginWarpper> captchaLogin(String phone, String code, Integer uid, Integer type, Integer userType,String loginType) throws Exception;
 
 
    /**
     * 手机号码查询用户
     * @param phone
     * @return
     * @throws Exception
     */
    UserInfo queryByPhone(String phone) throws Exception;
 
 
    /**
     * 账号密码登录
     * @param phone
     * @param password
     * @return
     * @throws Exception
     */
    ResultUtil<LoginWarpper> userLogin(String phone, String password,String loginType) throws Exception;
 
 
    /**
     * 微信授权登录
     * @param type              登录端口(1:APP登录,2:小程序)
     * @param openid            微信openid
     * @param unionid           微信unionid
     * @param jscode            小程序登录时的jscode临时凭证
     * @param registIp          ip地址
     * @param registAreaCode    当前定位区县行政编号(6位)
     * @return
     */
    ResultUtil<LoginWarpper> wxLogin(Integer type, String openid, String unionid, String jscode, String registIp, String registAreaCode, Integer sex, String nickName, String avatar,String loginType) throws Exception;
 
 
    /**
     * 忘记密码的操作
     * @param phone
     * @param code
     * @param password
     * @return
     * @throws Exception
     */
    ResultUtil forgetPassword(String phone, String code, String password) throws Exception;
 
 
    /**
     * 设置手机号码
     * @param uid
     * @param phone
     * @param code
     * @return
     * @throws Exception
     */
    ResultUtil bindingPhone(Integer uid, String phone, String code,String loginType) throws Exception;
 
 
    /**
     * 从redis中获取用户id
     * @param request
     * @return
     * @throws Exception
     */
    Integer getUserIdFormRedis(HttpServletRequest request) throws Exception;
 
 
    /**
     * 获取用户详情
     * @param uid
     * @return
     * @throws Exception
     */
    Map<String, Object> queryUserInfo(Integer uid) throws Exception;
 
 
    /**
     * 电话号码查询用户
     * @param phone
     * @return
     * @throws Exception
     */
    Map<String, Object> queryUser(String phone) throws Exception;
 
 
    /**
     * 设置紧急联系人
     * @param name
     * @param phone
     * @param uid
     * @throws Exception
     */
    void setUrgentUser(String name, String phone, Integer uid) throws Exception;
 
 
    /**
     * 充值余额
     * @param payType
     * @param money
     * @param uid
     * @return
     * @throws Exception
     */
    ResultUtil depositBalance(Integer payType, Double money, Integer uid, Integer type) throws Exception;
 
 
    /**
     * 修改手机号码
     * @param code
     * @param phone
     * @param uid
     * @return
     * @throws Exception
     */
    ResultUtil updatePhone(String code, String phone, Integer uid) throws Exception;
 
 
    /**
     * 修改密码
     * @param password
     * @param uid
     * @return
     * @throws Exception
     */
    ResultUtil updatePass(String password, Integer uid) throws Exception;
 
 
    /**
     * 修改个人信息
     * @param avatar
     * @param nickname
     * @param sex
     * @param birthday
     * @param uid
     * @throws Exception
     */
    void updateInfo(String avatar, String nickname, Integer sex, Date birthday, Integer uid) throws Exception;
 
    /**
     * 获取实名认证数据
     * @param uid
     * @return
     * @throws Exception
     */
    Map<String, Object> queryRealName(Integer uid) throws Exception;
 
 
    /**
     * 充值余额完成支付后的处理
     * @param id            用户id
     * @param order_id      工行订单id
     * @param paymentRecordId   预支付订单id
     * @param type          支付类型(1=微信,2=支付宝)
     * @throws Exception
     */
    void payCancelUserBalance(Integer id, String order_id, Integer paymentRecordId, Integer type) throws Exception;
 
 
    /**
     * H5接入道行龙城实现登录
     * @param authCode
     * @return
     * @throws Exception
     */
    ResultUtil<LoginWarpper> dxlcLogin(String authCode, String registAreaCode,String loginType) throws Exception;
 
 
    /**
     * 小程序中手机号码登录后绑定微信
     * @param userId
     * @param jscode
     * @return
     * @throws Exception
     */
    ResultUtil phoneLoginBindingWeChat(Integer userId, String jscode) throws Exception;
}