| | |
| | | package cc.mrbird.febs.dapp.controller; |
| | | |
| | | import cc.mrbird.febs.common.annotation.EncryptEnable; |
| | | import cc.mrbird.febs.common.configure.i18n.MessageSourceUtils; |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.dapp.service.DappWalletService; |
| | | import cc.mrbird.febs.dapp.vo.ActiveNftListVo; |
| | | import cc.mrbird.febs.dapp.vo.MemberNodeVo; |
| | | import cc.mrbird.febs.dapp.vo.NodeTypeVo; |
| | | import cc.mrbird.febs.dapp.vo.TeamListVo; |
| | | import cc.mrbird.febs.dapp.vo.WalletInfoVo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | return new FebsResponse().success().data(walletInfoVo); |
| | | } |
| | | |
| | | @ApiOperation(value = "购买节点", notes = "购买节点") |
| | | @PostMapping(value = "/buyNode") |
| | | public FebsResponse buyNode(@RequestBody BuyNodeDto buyNodeDto) { |
| | | return new FebsResponse().success().data(dappWalletService.buyNode(buyNodeDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取星团集合", notes = "获取星团集合") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = NodeTypeVo.class) |
| | | }) |
| | | @PostMapping(value = "/nodeList") |
| | | public FebsResponse nodeList() { |
| | | return dappWalletService.nodeList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "购买星团", notes = "购买星团") |
| | | @PostMapping(value = "/buyStar") |
| | | public FebsResponse buyStar(@RequestBody BuyStarDto buyStarDto) { |
| | | return new FebsResponse().success().data(dappWalletService.buyStar(buyStarDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "星团矩阵", notes = "星团矩阵") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = MemberNodeVo.class) |
| | | }) |
| | | @PostMapping(value = "/memberNode") |
| | | public FebsResponse memberNode(@RequestBody MemberNodeDto memberNodeDto) { |
| | | return new FebsResponse().success().data(dappWalletService.memberNode(memberNodeDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "转账", notes = "转账") |
| | | @PostMapping(value = "/transfer") |
| | | public FebsResponse transfer(@RequestBody TransferDto transferDto) { |
| | | return new FebsResponse().success().data(dappWalletService.transfer(transferDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "手续费充值", notes = "手续费充值") |
| | | @PostMapping(value = "/chargeFee") |
| | | public FebsResponse chargeFee(@RequestBody ChargeFeeDto chargeFeeDto) { |
| | | return new FebsResponse().success().data(dappWalletService.chargeFee(chargeFeeDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "手续费计算", notes = "手续费计算") |
| | | @PostMapping(value = "/calPrice") |
| | | public FebsResponse calPrice(@RequestBody PriceDto priceDto) { |
| | | return new FebsResponse().success().data(dappWalletService.calPrice(priceDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "记录列表", notes = "记录列表") |
| | |
| | | |
| | | @ApiOperation(value = "提现", notes = "提现") |
| | | @PostMapping(value = "/withdraw") |
| | | public FebsResponse withdraw(@RequestBody WithdrawDto withdrawDto) { |
| | | return new FebsResponse().success(); |
| | | public FebsResponse withdraw(@RequestBody @Valid WithdrawDto withdrawDto) { |
| | | dappWalletService.withdraw(withdrawDto); |
| | | return new FebsResponse().success().message("success"); |
| | | } |
| | | |
| | | // @ApiOperation(value = "系统参数", notes = "系统参数") |
| | | // @ApiResponses({ |
| | | // @ApiResponse(code = 200, message = "success", response = SystemDto.class) |
| | | // }) |
| | | // @GetMapping(value = "/system") |
| | | // public FebsResponse system() { |
| | | // return new FebsResponse().success().data(dappSystemService.system()); |
| | | // } |
| | | |
| | | @ApiOperation(value = "我的团队", notes = "我的团队") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = TeamListVo.class) |
| | | }) |
| | | @PostMapping(value = "/team") |
| | | public FebsResponse team(@RequestBody TeamListDto teamListDto) { |
| | | return new FebsResponse().success().data(dappMemberService.findTeamList(teamListDto)); |
| | | public FebsResponse team() { |
| | | return new FebsResponse().success().data(dappMemberService.findTeamList()); |
| | | } |
| | | |
| | | @PostMapping(value = "/logout") |
| | | public FebsResponse logout() { |
| | | DappMemberEntity member = LoginUserUtil.getAppUser(); |
| | | redisUtils.hdel(AppContants.REDIS_KEY_SIGN, member.getAddress()); |
| | | redisUtils.hdel(AppContants.REDIS_KEY_MEMBER_INFO, member.getAddress()); |
| | | return new FebsResponse().success(); |
| | | } |
| | | } |