| | |
| | | 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.entity.DappAccountMoneyChangeEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappNodeOrderEntity; |
| | | 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.ApiRunListInfoVo; |
| | | import cc.mrbird.febs.dapp.vo.TeamListVo; |
| | | import cc.mrbird.febs.dapp.vo.WalletInfoVo; |
| | | import cc.mrbird.febs.dapp.vo.*; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * @author |
| | |
| | | private final DappMemberService dappMemberService; |
| | | private final RedisUtils redisUtils; |
| | | |
| | | @ApiOperation(value = "获取账户信息接口", notes = "获取账号信息接口") |
| | | @ApiOperation(value = "获取用户信息", notes = "获取用户信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = WalletInfoVo.class) |
| | | @ApiResponse(code = 200, message = "success", response = DappMemberInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/walletInfo") |
| | | public FebsResponse walletInfo() { |
| | | WalletInfoVo walletInfoVo = dappWalletService.walletInfo(); |
| | | return new FebsResponse().success().data(walletInfoVo); |
| | | } |
| | | |
| | | @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 = "/recordInPage") |
| | | public FebsResponse recordInPage(@RequestBody RecordInPageDto recordInPageDto) { |
| | | return new FebsResponse().success().data(dappWalletService.recordInPage(recordInPageDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "提现", notes = "提现") |
| | | @PostMapping(value = "/withdraw") |
| | | public FebsResponse withdraw(@RequestBody @Valid WithdrawDto withdrawDto) { |
| | | dappWalletService.withdraw(withdrawDto); |
| | | return new FebsResponse().success().message("success"); |
| | | @PostMapping(value = "/memberInfo") |
| | | public FebsResponse memberInfo() { |
| | | return dappMemberService.getMemberInfo(); |
| | | } |
| | | |
| | | @ApiOperation(value = "我的团队", notes = "我的团队") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = TeamListVo.class) |
| | | }) |
| | | @PostMapping(value = "/team") |
| | | @PostMapping(value = "/teamList") |
| | | public FebsResponse team() { |
| | | return new FebsResponse().success().data(dappMemberService.findTeamList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "记录列表", notes = "记录列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = DappFundFlowVo.class) |
| | | }) |
| | | @PostMapping(value = "/recordInPage") |
| | | public FebsResponse recordInPage(@RequestBody RecordInPageDto recordInPageDto) { |
| | | return new FebsResponse().success().data(dappWalletService.getRecordVoInPage(recordInPageDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "共享收入与业绩", notes = "共享收入与业绩") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = DappAccountMoneyChangeEntity.class) |
| | | }) |
| | | @PostMapping(value = "/changeInPage") |
| | | public FebsResponse changeInPage(@RequestBody ChangeInPageDto changeInPageDto) { |
| | | return dappWalletService.getChangeInPageInPage(changeInPageDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "最新共享收入与业绩", notes = "最新共享收入与业绩") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = DappAccountMoneyChangeEntity.class) |
| | | }) |
| | | @GetMapping(value = "/changeInToday") |
| | | public FebsResponse changeInToday() { |
| | | return dappWalletService.changeInToday(); |
| | | } |
| | | |
| | | @ApiOperation(value = "兑换AUSDT", notes = "兑换AUSDT") |
| | | @PostMapping(value = "/transferAusd") |
| | | public FebsResponse transferAusd(@RequestBody TransferAusdDto transferAusdDto) { |
| | | return new FebsResponse().success().data(dappWalletService.transferAusd(transferAusdDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "闪兑-资产钱包转帐到闪兑钱包3% 手续费(扣币)", notes = "资产钱包转帐到闪兑钱包3% 手续费(扣币)") |
| | | @PostMapping(value = "/mineToCoin") |
| | | public FebsResponse mineToCoin(@RequestBody MineToCoinDto mineToCoinDto) { |
| | | dappWalletService.mineToCoin(mineToCoinDto); |
| | | return new FebsResponse().success().data("success"); |
| | | } |
| | | |
| | | @ApiOperation(value = "互转ANDAO", notes = "互转ANDAO") |
| | | @PostMapping(value = "/roundCoin") |
| | | public FebsResponse roundCoin(@RequestBody RoundCoinDto roundCoinDto) { |
| | | dappWalletService.roundCoin(roundCoinDto); |
| | | return new FebsResponse().success().data("success"); |
| | | } |
| | | |
| | | @ApiOperation(value = "互转AUSDT", notes = "互转AUSDT") |
| | | @PostMapping(value = "/roundCoinAusdt") |
| | | public FebsResponse roundCoinAusdt(@RequestBody RoundCoinDto roundCoinDto) { |
| | | dappWalletService.roundCoinAusdt(roundCoinDto); |
| | | return new FebsResponse().success().data("success"); |
| | | } |
| | | |
| | | @ApiOperation(value = "提现规则", notes = "提现规则") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = CashOutSettingVo.class) |
| | | }) |
| | | @GetMapping(value = "/cashOutSetting") |
| | | public FebsResponse cashOutSetting() { |
| | | return new FebsResponse().success().data(dappWalletService.cashOutSetting()); |
| | | } |
| | | |
| | | @ApiOperation(value = "提现", notes = "提现") |
| | | @PostMapping(value = "/withdraw") |
| | | public FebsResponse withdraw(@RequestBody @Valid WithdrawDto withdrawDto) { |
| | | // return new FebsResponse().success().message("合约更新中"); |
| | | dappWalletService.withdraw(withdrawDto); |
| | | return new FebsResponse().success().message("success"); |
| | | } |
| | | |
| | | @ApiOperation(value = "动能信息", notes = "动能信息") |
| | |
| | | return new FebsResponse().success().data(dappMemberService.findRunListInfo()); |
| | | } |
| | | |
| | | // @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()); |
| | | // } |
| | | |
| | | @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)); |
| | | } |
| | | } |