From 8f85e6917bf3a80bbe8f5531585c7c5d69e0309b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 20 Sep 2023 17:00:16 +0800
Subject: [PATCH] 后台修改
---
src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java | 127 +++++++++++++++++++++++++++---------------
1 files changed, 82 insertions(+), 45 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java b/src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java
index 5c21c91..e66749f 100644
--- a/src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java
+++ b/src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java
@@ -7,14 +7,14 @@
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;
@@ -24,6 +24,7 @@
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
+import java.util.HashMap;
/**
* @author
@@ -43,42 +44,93 @@
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 = "动能信息")
@@ -90,26 +142,11 @@
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));
}
}
--
Gitblit v1.9.1