From f9b6accb4ca10a20ff293ff53c371b53e68ee96f Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 15 Aug 2023 17:28:06 +0800
Subject: [PATCH] 后台修改

---
 src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java |  125 ++++++++++++++++++++++-------------------
 1 files changed, 68 insertions(+), 57 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 702c9bc..82dcdbc 100644
--- a/src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java
+++ b/src/main/java/cc/mrbird/febs/dapp/controller/ApiDappMemberController.java
@@ -1,18 +1,20 @@
 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.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.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;
@@ -22,6 +24,7 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
+import java.util.HashMap;
 
 /**
  * @author
@@ -41,83 +44,91 @@
     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 = "/calPrice")
-    public FebsResponse calPrice(@RequestBody PriceDto priceDto) {
-        return new FebsResponse().success().data(dappWalletService.calPrice(priceDto));
-    }
-
-    @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());
+    @PostMapping(value = "/memberInfo")
+    public FebsResponse memberInfo() {
+        return dappMemberService.getMemberInfo();
     }
 
     @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));
+    @PostMapping(value = "/teamList")
+    public FebsResponse team() {
+        return new FebsResponse().success().data(dappMemberService.findTeamList());
     }
 
+    @ApiOperation(value = "记录列表", notes = "记录列表")
     @ApiResponses({
-            @ApiResponse(code = 200, message = "success", response = ActiveNftListVo.class)
+            @ApiResponse(code = 200, message = "success", response = DappFundFlowVo.class)
     })
-    @ApiOperation(value = "开盲盒", notes = "开盲盒")
-    @PostMapping(value = "/boxSurprise")
-    public FebsResponse boxSurprise() {
-        ActiveNftListVo data = dappWalletService.boxSurprise();
-        return new FebsResponse().success().data(data);
+    @PostMapping(value = "/recordInPage")
+    public FebsResponse recordInPage(@RequestBody RecordInPageDto recordInPageDto) {
+        return new FebsResponse().success().data(dappWalletService.getRecordVoInPage(recordInPageDto));
     }
 
-    @ApiOperation(value = "激活卡牌", notes = "激活卡牌")
-    @PostMapping(value = "/activeNft")
-    public FebsResponse activeNft(@RequestBody @Valid ActiveDto activeDto) {
-        dappWalletService.activeNft(activeDto);
-        return new FebsResponse().success().message("激活成功");
-    }
-
+    @ApiOperation(value = "共享收入与业绩", notes = "共享收入与业绩")
     @ApiResponses({
-            @ApiResponse(code = 200, message = "success", response = ActiveNftListVo.class)
+            @ApiResponse(code = 200, message = "success", response = DappAccountMoneyChangeEntity.class)
     })
-    @ApiOperation(value = "卡牌列表", notes = "卡牌列表")
-    @PostMapping(value = "/findNftList")
-    public FebsResponse findNftList() {
-        return new FebsResponse().success().data(dappWalletService.findUnActiveNftList());
+    @GetMapping(value = "/changeInPage")
+    public FebsResponse changeInPage(@RequestBody ChangeInPageDto changeInPageDto) {
+        return dappWalletService.getChangeInPageInPage(changeInPageDto);
     }
 
+    @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 = "提现")
+    @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 = "动能信息")
+    @ApiResponses({
+            @ApiResponse(code = 200, message = "success", response = ApiRunListInfoVo.class)
+    })
+    @PostMapping(value = "/runListInfo")
+    public FebsResponse runListInfo() {
+        return new FebsResponse().success().data(dappMemberService.findRunListInfo());
+    }
 
     @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();
     }
 }

--
Gitblit v1.9.1