From 6feca7b6f433cf4558ad8423d6eb0ff109880c78 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 02 Dec 2022 11:44:51 +0800
Subject: [PATCH] 20221130
---
src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java | 83 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 81 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 2e3abad..91bc87b 100644
--- a/src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java
+++ b/src/main/java/cc/mrbird/febs/dapp/controller/ViewController.java
@@ -4,7 +4,15 @@
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.DappSystemProfitDao;
+import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper;
import cc.mrbird.febs.dapp.service.DappMemberService;
+import cc.mrbird.febs.dapp.vo.AdminSystemFeeVo;
+import cn.hutool.core.util.ObjectUtil;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
@@ -16,7 +24,7 @@
import java.math.BigDecimal;
/**
- * @author
+ * @author
* @date 2022-03-21
**/
@Controller("dappView")
@@ -25,6 +33,8 @@
public class ViewController {
private final RedisUtils redisUtils;
+ private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
+ private final DappSystemProfitDao dappSystemProfitDao;
@GetMapping(value = "admin")
@RequiresPermissions("admin:view")
@@ -108,11 +118,80 @@
}
- @GetMapping(value ="priceSetting")
+ @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);
+ }
+ 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");
+ }
}
--
Gitblit v1.9.1