From 54be1e5481d58ea7fa39a34c0bd0e442c406a4b8 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 21 Sep 2023 11:49:38 +0800
Subject: [PATCH] 后台修改
---
src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java | 183 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 181 insertions(+), 2 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java b/src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java
index 42639a8..125465a 100644
--- a/src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java
+++ b/src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java
@@ -1,23 +1,45 @@
package cc.mrbird.febs.dapp.controller;
+import cc.mrbird.febs.common.contants.AppContants;
import cc.mrbird.febs.common.entity.FebsConstant;
import cc.mrbird.febs.common.utils.FebsUtil;
+import cc.mrbird.febs.common.utils.RedisUtils;
+import cc.mrbird.febs.dapp.entity.DappMemberEntity;
+import cc.mrbird.febs.dapp.entity.DappSystemProfit;
+import cc.mrbird.febs.dapp.entity.DataDictionaryCustom;
+import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum;
+import cc.mrbird.febs.dapp.mapper.*;
+import cc.mrbird.febs.dapp.service.DappMemberService;
+import cc.mrbird.febs.dapp.vo.AdminAgentLevelSetInfoVo;
+import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo;
+import cc.mrbird.febs.dapp.vo.DappMemberInfoVo;
+import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.checkerframework.checker.units.qual.A;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+import java.math.BigDecimal;
+
/**
- * @author
+ * @author
* @date 2022-03-21
**/
@Controller("dappView")
@RequestMapping(FebsConstant.VIEW_PREFIX + "dappView")
@RequiredArgsConstructor
public class ViewController {
+
+ private final RedisUtils redisUtils;
+ private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
+ private final DappSystemProfitDao dappSystemProfitDao;
+ private final DappMemberDao dappMemberDao;
+ private final DappWalletCoinDao dappWalletCoinDao;
+ private final DappWalletMineDao dappWalletMineDao;
@GetMapping(value = "admin")
@RequiresPermissions("admin:view")
@@ -45,7 +67,7 @@
@GetMapping(value = "admin/simulateResult/{batch}")
public String simulateResult(@PathVariable("batch") String batch, Model model) {
- String url = "http://120.27.238.55:8000/dapp/index.html?isDev=true&batchNo=" + batch;
+ String url = "https://birdworld.vip/index.html?isDev=true&batchNo=" + batch;
model.addAttribute("url", url);
return FebsUtil.view("dapp/simulate-result");
}
@@ -61,6 +83,12 @@
@RequiresPermissions("withdraw:view")
public String memberWithdraw() {
return FebsUtil.view("dapp/member-withdraw");
+ }
+
+ @GetMapping("memberCharge")
+ @RequiresPermissions("charge:view")
+ public String memberCharge() {
+ return FebsUtil.view("dapp/member-charge");
}
@GetMapping("walletCoin")
@@ -100,4 +128,155 @@
return FebsUtil.view("dapp/agent-return");
}
+
+ @GetMapping(value = "priceSetting")
+ @RequiresPermissions("price:setting:view")
+ public String priceSetting(Model model) {
+ BigDecimal price = (BigDecimal) redisUtils.get(AppContants.REDIS_KEY_ETH_NEW_PRICE);
+ model.addAttribute("newestPrice", price);
+ return FebsUtil.view("dapp/newest-price-setting");
+ }
+
+ //费率设置
+ @GetMapping(value = "systemFeeSet")
+ @RequiresPermissions("fee:setting:view")
+ public String systemFeeSet(Model model) {
+ AdminSystemFeeVo adminSystemFeeVo = new AdminSystemFeeVo();
+// DataDictionaryCustom rebateDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.REBATE_PERCENT.getType(), DataDictionaryEnum.REBATE_PERCENT.getCode());
+// if (ObjectUtil.isNotEmpty(rebateDic)) {
+// String value = rebateDic.getValue() == null ? "0" : rebateDic.getValue();
+// adminSystemFeeVo.setRebatePercent(value);
+// }
+// DataDictionaryCustom memberFeeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.MEMBER_FEE.getType(), DataDictionaryEnum.MEMBER_FEE.getCode());
+// if (ObjectUtil.isNotEmpty(memberFeeDic)) {
+// String value = memberFeeDic.getValue() == null ? "0" : memberFeeDic.getValue();
+// adminSystemFeeVo.setMemberFee(value);
+// }
+// DataDictionaryCustom serviceFeeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.WITHDRAW_SERVICE_FEE.getType(), DataDictionaryEnum.WITHDRAW_SERVICE_FEE.getCode());
+// if (ObjectUtil.isNotEmpty(serviceFeeDic)) {
+// String value = serviceFeeDic.getValue() == null ? "0" : serviceFeeDic.getValue();
+// adminSystemFeeVo.setServiceFee(value);
+// }
+//
+// DataDictionaryCustom symbolPrice = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.SYMBOL_PRICE.getType(), DataDictionaryEnum.SYMBOL_PRICE.getCode());
+// if (ObjectUtil.isNotEmpty(symbolPrice)) {
+// String value = symbolPrice.getValue() == null ? "0" : symbolPrice.getValue();
+// adminSystemFeeVo.setSymbolPrice(value);
+// }
+//
+// DataDictionaryCustom directProfitDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+// DataDictionaryEnum.DIRECT_PROFIT.getType(), DataDictionaryEnum.DIRECT_PROFIT.getCode());
+// if (ObjectUtil.isNotEmpty(directProfitDic)) {
+// String value = directProfitDic.getValue() == null ? "0" : directProfitDic.getValue();
+// adminSystemFeeVo.setDirectProfit(value);
+// }
+// model.addAttribute("systemFee", adminSystemFeeVo);
+ return FebsUtil.view("dapp/system-fee-set");
+ }
+
+ /**
+ * 动能列表
+ * @return
+ */
+ @GetMapping(value = "systemProfit")
+ @RequiresPermissions("systemProfit:view")
+ public String systemProfit() {
+ return FebsUtil.view("dapp/system-profit");
+ }
+
+
+ public static long systemProfitId;
+ /**
+ * 动能列表-流水详情
+ * @param id
+ * @param model
+ * @return
+ */
+ @GetMapping("/systemProfitFlow/{id}")
+ @RequiresPermissions("systemProfitFlow:view")
+ public String systemProfitFlow(@PathVariable long id, Model model) {
+ systemProfitId = id;
+ return FebsUtil.view("dapp/system-profit-flow");
+ }
+
+ public static long teamInfoMemberId;
+ /**
+ * 用户列表-团队详情
+ * @param id
+ * @param model
+ * @return
+ */
+ @GetMapping("/teamInfo/{id}")
+ @RequiresPermissions("teamInfo:view")
+ public String teamInfo(@PathVariable long id, Model model) {
+ teamInfoMemberId = id;
+ return FebsUtil.view("dapp/member-teamInfo");
+ }
+
+
+
+ public static long memberNodeInfoMemberId;
+ /**
+ * 用户列表-购买记录
+ * @param id
+ * @param model
+ * @return
+ */
+ @GetMapping("/memberNodeInfo/{id}")
+ @RequiresPermissions("memberNodeInfo:view")
+ public String memberNodeInfo(@PathVariable long id, Model model) {
+ memberNodeInfoMemberId = id;
+ return FebsUtil.view("dapp/member-node-Info");
+ }
+
+
+ /**
+ * 代理级别-设置代理
+ * @param id
+ * @param model
+ * @return
+ */
+ @GetMapping("agentLevel/{id}")
+ @RequiresPermissions("agentLevel:view")
+ public String agentLevelSet(@PathVariable long id, Model model) {
+ DappMemberEntity dappMemberEntity = dappMemberDao.selectById(id);
+ AdminAgentLevelSetInfoVo data = new AdminAgentLevelSetInfoVo();
+ data.setId(id);
+ model.addAttribute("agentLevelSet", data);
+ return FebsUtil.view("dapp/member-agent-level");
+ }
+
+
+ /**
+ * 拨付
+ * @return
+ */
+ @GetMapping("mallSystemPay/{type}/{id}")
+ @RequiresPermissions("agentLevel:view")
+ public String systemPay(@PathVariable long id, @PathVariable Integer type, Model model) {
+ DappMemberInfoVo data = dappMemberDao.selectDappMemberInfoVoByMemberId(id);
+ model.addAttribute("systemPay", data);
+ model.addAttribute("type", type);
+ return FebsUtil.view("dapp/mallSystemPay");
+ }
+
+ /**
+ * 个人-资金流水
+ * @param id
+ * @param model
+ * @return
+ */
+ public static long idMemberMoneyFlow;
+ @GetMapping("memberFlow/{id}")
+ @RequiresPermissions("agentLevel:view")
+ public String memberFlow(@PathVariable long id, Model model) {
+ idMemberMoneyFlow = id;
+ return FebsUtil.view("dapp/memberMoneyFlow");
+ }
+
+ @GetMapping("soccerLeagues")
+ @RequiresPermissions("soccerLeagues:view")
+ public String soccerLeagues() {
+ return FebsUtil.view("dapp/soccerLeagues");
+ }
}
--
Gitblit v1.9.1