|  |  |  | 
|---|
|  |  |  | import javax.annotation.Resource; | 
|---|
|  |  |  | import javax.validation.Valid; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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.modules.coin.parameter.dto.RecordsPageDto; | 
|---|
|  |  |  | import com.xcong.excoin.modules.member.parameter.dto.*; | 
|---|
|  |  |  | import com.xcong.excoin.modules.member.parameter.vo.*; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.xcong.excoin.common.response.Result; | 
|---|
|  |  |  | import com.xcong.excoin.modules.member.parameter.dto.MemberAuthenticationDto; | 
|---|
|  |  |  | import com.xcong.excoin.modules.member.parameter.dto.MemberForgetPwdDto; | 
|---|
|  |  |  | 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.vo.MemberInfoVo; | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @date 2020-05-18 | 
|---|
|  |  |  | **/ | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @CrossOrigin("*") | 
|---|
|  |  |  | @Api(value = "个人中心接口", tags = "个人中心接口") | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | @RequestMapping(value = "/api/member") | 
|---|
|  |  |  | public class MemberController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Resource | 
|---|
|  |  |  | MemberService memberService; | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 忘记密码 | 
|---|
|  |  |  | * @param code 验证码 | 
|---|
|  |  |  | * @param password 新密码 | 
|---|
|  |  |  | * @param token 用户登录的token | 
|---|
|  |  |  | * @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="/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(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 实名认证 | 
|---|
|  |  |  | * @param token | 
|---|
|  |  |  | * @param memberAuthenVo | 
|---|
|  |  |  | * @param request | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value="实名认证", notes="实名认证") | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改资金密码 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param code 验证码 | 
|---|
|  |  |  | * @param password 新密码 | 
|---|
|  |  |  | * @param token 用户登录的token | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value="修改资金密码", notes="修改资金密码") | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 用户退出登录 | 
|---|
|  |  |  | * @param token | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value="用户退出登录", notes="用户退出登录") | 
|---|
|  |  |  | 
|---|
|  |  |  | return memberService.memberLogout(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 设置交易密码 | 
|---|
|  |  |  | * @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(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *    提币币种可用资金 | 
|---|
|  |  |  | * @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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | *    提币申请 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value="提交提币申请", notes="提交提币申请") | 
|---|
|  |  |  | @PostMapping(value="/memberSubmitCoinApply") | 
|---|
|  |  |  | public Result memberSubmitCoinApply(@RequestBody @Valid MemberSubmitCoinApplyDto memberSubmitCoinApplyDto) { | 
|---|
|  |  |  | return Result.fail("暂未开放提币"); | 
|---|
|  |  |  | //      return memberService.memberSubmitCoinApply(memberSubmitCoinApplyDto); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 我的直属团队 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiOperation(value = "我的直属团队", notes = "我的直属团队") | 
|---|
|  |  |  | @ApiResponses({@ApiResponse( code = 200, message = "success", response = MemberTeamVo.class)}) | 
|---|
|  |  |  | @PostMapping(value="/memberTeam") | 
|---|
|  |  |  | public Result  memberTeam(@RequestBody @Valid MemberTeamRecordsPageDto memberTeamRecordsPageDto) { | 
|---|
|  |  |  | return memberService.memberTeam(memberTeamRecordsPageDto); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|