| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.dto.*; |
| | | import cc.mrbird.febs.dapp.dto.BuyNodeDto; |
| | | import cc.mrbird.febs.dapp.dto.RecordInPageDto; |
| | | import cc.mrbird.febs.dapp.dto.WithdrawDto; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | 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.TeamListVo; |
| | | import cc.mrbird.febs.dapp.vo.WalletInfoVo; |
| | | import cc.mrbird.febs.dapp.vo.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | |
| | | public class ApiDappMemberController { |
| | | |
| | | private final DappWalletService dappWalletService; |
| | | private final DappSystemService dappSystemService; |
| | | private final DappMemberService dappMemberService; |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @ApiOperation(value = "大单排名前十", notes = "大单排名前十") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiStorageInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/storageIndex") |
| | | public FebsResponse storageIndex() { |
| | | return new FebsResponse().success().data(dappWalletService.storageIndex()); |
| | | } |
| | | |
| | | @ApiOperation(value = "直推总业绩排名前十", notes = "直推总业绩排名前十") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiStorageInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/directIndex") |
| | | public FebsResponse directIndex() { |
| | | return new FebsResponse().success().data(dappWalletService.directIndex()); |
| | | } |
| | | |
| | | @ApiOperation(value = "首页六项数据", notes = "首页六项数据") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiIndexInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/indexInfo") |
| | | public FebsResponse indexInfo() { |
| | | return new FebsResponse().success().data(dappWalletService.indexInfo()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取账户信息接口", notes = "获取账号信息接口") |
| | | @ApiResponses({ |
| | |
| | | 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 = "购买星团") |
| | | @PostMapping(value = "/buyStar") |
| | | public FebsResponse buyStar(@RequestBody BuyStarDto buyStarDto) { |
| | | return new FebsResponse().success().data(dappWalletService.buyStar(buyStarDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "转账", notes = "转账") |
| | | @PostMapping(value = "/transfer") |
| | | public FebsResponse transfer(@RequestBody TransferDto transferDto) { |
| | | return new FebsResponse().success().data(dappWalletService.transfer(transferDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "记录列表", notes = "记录列表") |
| | | @ApiOperation(value = "资金流水", notes = "资金流水") |
| | | @PostMapping(value = "/recordInPage") |
| | | public FebsResponse recordInPage(@RequestBody RecordInPageDto recordInPageDto) { |
| | | return new FebsResponse().success().data(dappWalletService.recordInPage(recordInPageDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的团队-上半部分", notes = "我的团队-上半部分") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = TeamUpVo.class) |
| | | }) |
| | | @PostMapping(value = "/teamUp") |
| | | public FebsResponse teamUp() { |
| | | return new FebsResponse().success().data(dappMemberService.teamUp()); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的团队-列表", notes = "我的团队-列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = TeamDownVo.class) |
| | | }) |
| | | @PostMapping(value = "/teamDown") |
| | | public FebsResponse teamDown() { |
| | | return new FebsResponse().success().data(dappMemberService.teamDown()); |
| | | } |
| | | |
| | | @ApiOperation(value = "存储", notes = "存储") |
| | | @PostMapping(value = "/buyNode") |
| | | public FebsResponse buyNode(@RequestBody BuyNodeDto buyNodeDto) { |
| | | return new FebsResponse().success().data(dappWalletService.buyNode(buyNodeDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "提现", notes = "提现") |
| | |
| | | return new FebsResponse().success().message("success"); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的团队", notes = "我的团队") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = TeamListVo.class) |
| | | }) |
| | | @PostMapping(value = "/team") |
| | | public FebsResponse team() { |
| | | return new FebsResponse().success().data(dappMemberService.findTeamList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "退出", notes = "退出") |
| | | @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(); |
| | | } |
| | | |
| | | @ApiOperation(value = "计算手续费", notes = "计算手续费") |
| | | @PostMapping(value = "/calPrice") |
| | | public FebsResponse calPrice(@RequestBody PriceDto priceDto) { |
| | | return new FebsResponse().success().data(dappWalletService.calPrice(priceDto)); |
| | | } |
| | | } |