Helius
2020-11-04 3e559a23137c7c992add11029b53a578d867b4d3
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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
package com.xcong.excoin.modules.member.controller;
 
import javax.annotation.Resource;
import javax.validation.Valid;
 
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.xcong.excoin.common.response.Result;
import com.xcong.excoin.modules.member.parameter.dto.MemberAddCoinAddressDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberAuthenticationDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberBindEmailDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberBindPhoneDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberDelCoinAddressDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberDelPaymethodDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberForgetPwdDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberPaymethodDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberSubmitCoinApplyDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdatePwdDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradePwdDto;
import com.xcong.excoin.modules.member.parameter.dto.MemberUpdateTradersPwdTimeDto;
import com.xcong.excoin.modules.member.parameter.vo.AppVersionListVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberAuthenticationInfoVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberAvivableCoinInfoVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressCountListVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberCoinAddressListVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberCoinInfoListVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberInfoVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberPaymethodDetailListVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberPaymethodDetailVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberPersonCenterInfoVo;
import com.xcong.excoin.modules.member.parameter.vo.MemberSendCodeWayVo;
import com.xcong.excoin.modules.member.service.MemberService;
 
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
 
/**
 * 用户类
 *
 * @author wzy
 * @date 2020-05-18
 **/
@Slf4j
@Api(value = "个人中心接口", tags = "个人中心接口")
@RestController
@RequestMapping(value = "/api/member")
public class MemberController {
    
    @Resource
    MemberService memberService;
    
    /**
     *  获取当前版本号
     */
    @ApiOperation(value="APP端获取当前版本号", notes="获取当前版本号")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = AppVersionListVo.class)})
    @GetMapping(value = "/getAppVersionInfo")
    public Result  getAppVersionInfo() {
        return memberService.getAppVersionInfo();
    }
 
 
    /**
     *  获取当前版本号
     */
    @ApiOperation(value="PC端获取当前版本号", notes="获取当前版本号")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = AppVersionListVo.class)})
    @GetMapping(value = "/getPcVersionInfo")
    public Result  getPcVersionInfo() {
        return memberService.getPcVersionInfo();
    }
 
 
    /**
     *  获取我的信息
     * @return
     */
    @ApiOperation(value="获取我的信息", notes="获取我的信息")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberInfoVo.class)})
    @GetMapping(value = "/getMemberInfo")
    public Result  getMemberInfo() {
        return memberService.getMemberInfo();
    }
    
    /**
     * 忘记密码
     * @return
     */
    @ApiOperation(value=" 忘记密码", notes=" 忘记密码")
    @PostMapping(value="/memberForgetPwd")
    public Result  memberForgetPwd(@RequestBody @Valid MemberForgetPwdDto memberForgetPwdDto) {
        return memberService.memberForgetPwd(memberForgetPwdDto);
    }
    
    /**
     *  验证账户是否存在
     * @return
     */
    @ApiOperation(value="验证账户是否存在", notes="验证账户是否存在")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "account", value = "账号", required = true, dataType = "String", paramType="query"),
        @ApiImplicitParam(name = "type", value = "类型  1:手机号 2:邮箱", required = true, dataType = "int", paramType="query")
    })
    @GetMapping(value = "/getMemberAccountInfo")
    public Result  getMemberAccountInfo(String account,int type) {
        return memberService.getMemberAccountInfo(account,type);
    }
    
    /**
     * 修改密码
     * @return
     */
    @ApiOperation(value="修改密码", notes="修改密码")
    @PostMapping(value="/memberUpdatePwd")
    public Result  memberUpdatePwd(@RequestBody @Valid MemberUpdatePwdDto memberUpdatePwdDto) {
        //System.out.println("修改密码:");
        return memberService.memberUpdatePwd(memberUpdatePwdDto);
    }
    
    /**
     * 修改资金密码时效性
     * @return
     */
    @ApiOperation(value="修改资金密码时效性", notes="修改资金密码时效性")
    @PostMapping(value="/memberUpdateTradersPwdTime")
    public Result  memberUpdateTradersPwdTime(@RequestBody @Valid MemberUpdateTradersPwdTimeDto memberUpdateTradersPwdTimeDto) {
        //System.out.println("修改密码:");
        return memberService.memberUpdateTradersPwdTime(memberUpdateTradersPwdTimeDto);
    }
    
    /**
     * 获取实名认证信息
     * @return
     */
    @ApiOperation(value = "获取实名认证信息", notes = "获取实名认证信息")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberAuthenticationInfoVo.class)})
    @GetMapping(value = "/memberAuthenticationInfo")
    public Result memberAuthenticationInfo() {
        return memberService.memberAuthenticationInfo();
    }
    
    /**
     * 实名认证
     * @return
     */
    @ApiOperation(value="实名认证", notes="实名认证")
    @PostMapping(value="/memberAuthentication")
    public Result memberAuthentication(@RequestBody @Valid MemberAuthenticationDto memberAuthenticationDto) {
        return memberService.memberAuthentication(memberAuthenticationDto);
    }
    
    /**
     * 修改资金密码
     * @return
     */
    @ApiOperation(value="修改资金密码", notes="修改资金密码")
    @PostMapping(value="/memberUpdateTradePwd")
    public Result  memberUpdateTradePwd(@RequestBody @Valid MemberUpdateTradePwdDto memberUpdateTradePwdDto) {
        return memberService.memberUpdateTradePwd(memberUpdateTradePwdDto);
    }
    
    /**
     * 用户退出登录
     * @return
     */
    @ApiOperation(value="用户退出登录", notes="用户退出登录")
    @GetMapping(value = "/memberLogout")
    public Result  memberLogout() {
        return memberService.memberLogout();
    }
    
    /**
     * 设置交易密码    
     * @param code
     * @param password
     * @param token
     * @return
     */
    @ApiOperation(value="设置交易密码", notes="设置交易密码")
    @PostMapping(value="/memberTradersPwd")
    public Result  memberTradersPwd(@RequestBody @Valid MemberForgetPwdDto memberForgetPwdDto) {
        return memberService.memberTradersPwd(memberForgetPwdDto);
    }
    
    /**
     * 收款方式
     * @return
     */
    @ApiOperation(value="新增收款方式", notes="新增收款方式")
    @PostMapping(value="/memberAddPaymethod")
    public Result  memberAddPaymethod(@RequestBody @Valid MemberPaymethodDto memberPaymethodDto) {
        return memberService.memberAddPaymethod(memberPaymethodDto);
    }
    
    /**
     * 收款方式
     * @return
     */
    @ApiOperation(value="删除收款方式", notes="删除收款方式")
    @PostMapping(value="/memberDelPaymethod")
    public Result  memberDelPaymethod(@RequestBody @Valid MemberDelPaymethodDto memberDelPaymethodDto) {
        return memberService.memberDelPaymethod(memberDelPaymethodDto);
    }
    
    /**
     * 收款方式
     * @return
     */
    @ApiOperation(value="一个收款方式的详情", notes="一个收款方式的详情")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberPaymethodDetailVo.class)})
    @ApiImplicitParams({
        @ApiImplicitParam(name = "id", value = "ID", required = true, dataType = "long", paramType="query")
    })
    @GetMapping(value = "/memberPaymethodDetail")
    public Result memberPaymethodDetail(long id) {
        return memberService.memberPaymethodDetail(id);
    }
    
    /**
     * 收款方式
     * @return
     */
    @ApiOperation(value="收款方式的列表", notes="收款方式的列表")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberPaymethodDetailListVo.class)})
    @GetMapping(value = "/memberPaymethodDetailList")
    public Result memberPaymethodDetailList() {
        return memberService.memberPaymethodDetailList();
    }
    
    /**
     * 绑定手机号
     * @return
     */
    @ApiOperation(value="绑定手机号", notes="绑定手机号")
    @PostMapping(value="/memberBindPhone")
    public Result memberBindPhone(@RequestBody @Valid MemberBindPhoneDto memberBindPhoneDto) {
        return memberService.memberBindPhone(memberBindPhoneDto);
    }
    
    /**
     * 绑定邮箱
     * @return
     */
    @ApiOperation(value="绑定邮箱", notes="绑定邮箱")
    @PostMapping(value="/memberBindEmail")
    public Result memberBindEmail(@RequestBody @Validated MemberBindEmailDto memberBindEmailDto) {
        return memberService.memberBindEmail(memberBindEmailDto);
    }
    
    /**
     * 获取币种地址
     * @return
     */
    @ApiOperation(value = "获取币种地址数量", notes = "获取币种地址数量")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberCoinAddressCountListVo.class)})
    @GetMapping(value = "/memberCoinAddressCount")
    public Result memberCoinAddressCount() {
        return memberService.memberCoinAddressCount();
    }
    
    /**
     * 获取提币地址
     * @return
     */
    @ApiOperation(value = "获取提币地址列表", notes = "获取提币地址列表")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberCoinAddressListVo.class)})
    @ApiImplicitParams({
        @ApiImplicitParam(name = "symbol", value = "币种", required = true, dataType = "String", paramType="query")
    })
    @GetMapping(value = "/memberCoinAddressList")
    public Result memberCoinAddressList(String symbol) {
        return memberService.memberCoinAddressList(symbol);
    }
    
    /**
     * 添加提币地址
     * @return
     */
    @ApiOperation(value = "添加提币地址", notes = "添加提币地址")
    @PostMapping(value = "/memberAddCoinAddress")
    public Result memberAddCoinAddress(@RequestBody @Valid MemberAddCoinAddressDto memberAddCoinAddressDto) {
        return memberService.memberAddCoinAddress(memberAddCoinAddressDto);
    }
    
    /**
     * 删除提币地址
     * @return
     */
    @ApiOperation(value="删除提币地址", notes="删除提币地址")
    @PostMapping(value="/memberDelCoinAddress")
    public Result  memberDelCoinAddress(@RequestBody @Valid MemberDelCoinAddressDto memberDelCoinAddressDto) {
        return memberService.memberDelCoinAddress(memberDelCoinAddressDto);
    }
    
    /**
     * 获取发送验证码途径
     * @return
     */
    @ApiOperation(value = "获取发送验证码途径", notes = "获取发送验证码途径")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberSendCodeWayVo.class)})
    @GetMapping(value = "/memberSendCodeWay")
    public Result memberSendCodeWay() {
        return memberService.memberSendCodeWay();
    }
    
    /**
     * 获取个人中心信息
     * @return
     */
    @ApiOperation(value = "获取个人中心信息", notes = "获取个人中心信息")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberPersonCenterInfoVo.class)})
    @GetMapping(value = "/memberPersonCenterInfo")
    public Result memberPersonCenterInfo() {
        return memberService.memberPersonCenterInfo();
    }
    
    /**
     * 提币币种信息
     * @return
     */
    @ApiOperation(value = "获取提币币种信息", notes = "获取提币币种信息")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberCoinInfoListVo.class)})
    @GetMapping(value = "/memberCoinInfoList")
    public Result memberCoinInfoList() {
        return memberService.memberCoinInfoList();
    }
    
    /**
     *     提币币种可用资金
     * @param token
     * @param coinVo
     * @return
     */
    @ApiOperation(value = "提币币种可用资金", notes = "提币币种可用资金")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberAvivableCoinInfoVo.class)})
    @ApiImplicitParams({
        @ApiImplicitParam(name = "symbol", value = "币种", required = true, dataType = "String", paramType="query")
    })
    @GetMapping(value = "/memberAvivableCoinInfo")
    public Result memberAvivableCoinInfo(String symbol) {
        return memberService.memberAvivableCoinInfo(symbol);
    }
    
    /**
     *     提币申请
     * @param token
     * @param coinVo
     * @return
     */
    @ApiOperation(value="提交提币申请", notes="提交提币申请")
    @PostMapping(value="/memberSubmitCoinApply")
    public Result memberSubmitCoinApply(@RequestBody @Valid MemberSubmitCoinApplyDto memberSubmitCoinApplyDto) {
        return memberService.memberSubmitCoinApply(memberSubmitCoinApplyDto);
    }
    
}