From 971f739f9ee5fb868d72f9a85d65e9f0791d5032 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 24 Mar 2023 12:35:36 +0800
Subject: [PATCH] 后台修改

---
 src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java |   74 +++++++++++++++++++++++++++++++++++--
 1 files changed, 70 insertions(+), 4 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
index c4d2ba5..30abf20 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
@@ -7,10 +7,7 @@
 import cc.mrbird.febs.common.service.ValidateCodeService;
 import cc.mrbird.febs.common.utils.FebsUtil;
 import cc.mrbird.febs.common.utils.RedisUtils;
-import cc.mrbird.febs.mall.dto.CashOutSettingDto;
-import cc.mrbird.febs.mall.dto.HlmScoreSetDto;
-import cc.mrbird.febs.mall.dto.ScorePoorDto;
-import cc.mrbird.febs.mall.dto.ScoreSettingDto;
+import cc.mrbird.febs.mall.dto.*;
 import cc.mrbird.febs.mall.entity.DataDictionaryCustom;
 import cc.mrbird.febs.mall.entity.MallMember;
 import cc.mrbird.febs.mall.mapper.*;
@@ -49,6 +46,11 @@
         return FebsUtil.view("modules/system/profitSetting");
     }
 
+    /**
+     * 积分设置
+     * @param model
+     * @return
+     */
     @GetMapping("hlmScoreSet")
     @RequiresPermissions("hlmScoreSet:view")
     public String hlmScoreSet(Model model) {
@@ -59,6 +61,20 @@
         if (signScoreDic != null) {
             String signScore = ObjectUtil.isEmpty(signScoreDic.getValue()) ? "0" : signScoreDic.getValue();
             hlmScoreSetDto.setSignScore(signScore);
+        }
+        DataDictionaryCustom signScoreDaysDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.SIGN_SCORE_DAYS.getType(),
+                DataDictionaryEnum.SIGN_SCORE_DAYS.getCode());
+        if (signScoreDaysDic != null) {
+            String signScoreDays = ObjectUtil.isEmpty(signScoreDaysDic.getValue()) ? "0" : signScoreDaysDic.getValue();
+            hlmScoreSetDto.setSignScoreDays(signScoreDays);
+        }
+        DataDictionaryCustom signScoreCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.SIGN_SCORE_CNT.getType(),
+                DataDictionaryEnum.SIGN_SCORE_CNT.getCode());
+        if (signScoreCntDic != null) {
+            String signScoreCnt = ObjectUtil.isEmpty(signScoreCntDic.getValue()) ? "0" : signScoreCntDic.getValue();
+            hlmScoreSetDto.setSignScoreCnt(signScoreCnt);
         }
         DataDictionaryCustom scorePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                 DataDictionaryEnum.SCORE_PERCENT.getType(),
@@ -73,6 +89,13 @@
         if (scoreChangeDic != null) {
             String scoreChange = ObjectUtil.isEmpty(scoreChangeDic.getValue()) ? "0" : scoreChangeDic.getValue();
             hlmScoreSetDto.setScoreChange(scoreChange);
+        }
+        DataDictionaryCustom starGetDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.STAR_GET.getType(),
+                DataDictionaryEnum.STAR_GET.getCode());
+        if (starGetDic != null) {
+            String starGet = ObjectUtil.isEmpty(starGetDic.getValue()) ? "0" : starGetDic.getValue();
+            hlmScoreSetDto.setStarGet(starGet);
         }
         model.addAttribute("hlmScoreSet", hlmScoreSetDto);
         return FebsUtil.view("modules/system/hlmScoreSet");
@@ -151,4 +174,47 @@
         model.addAttribute("indexData", data);
         return FebsUtil.view("modules/system/indexData");
     }
+
+    @GetMapping("hlmBasicPerk")
+    @RequiresPermissions("hlmBasicPerk:view")
+    public String hlmBasicPerk(Model model) {
+        HlmBasicPerkDto hlmBasicPerkDto = new HlmBasicPerkDto();
+        DataDictionaryCustom sharePerkDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.SHARE_PERK.getType(),
+                DataDictionaryEnum.SHARE_PERK.getCode());
+        if (sharePerkDic != null) {
+            String sharePerk = ObjectUtil.isEmpty(sharePerkDic.getValue()) ? "0" : sharePerkDic.getValue();
+            hlmBasicPerkDto.setSharePerk(sharePerk);
+        }
+        DataDictionaryCustom teamPerkDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.TEAM_PERK.getType(),
+                DataDictionaryEnum.TEAM_PERK.getCode());
+        if (teamPerkDic != null) {
+            String teamPerk = ObjectUtil.isEmpty(teamPerkDic.getValue()) ? "0" : teamPerkDic.getValue();
+            hlmBasicPerkDto.setTeamPerk(teamPerk);
+        }
+        DataDictionaryCustom teamEqualsPerkDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.TEAM_EQUALS_PERK.getType(),
+                DataDictionaryEnum.TEAM_EQUALS_PERK.getCode());
+        if (teamEqualsPerkDic != null) {
+            String teamEqualsPerk = ObjectUtil.isEmpty(teamEqualsPerkDic.getValue()) ? "0" : teamEqualsPerkDic.getValue();
+            hlmBasicPerkDto.setTeamEqualsPerk(teamEqualsPerk);
+        }
+        DataDictionaryCustom offLinePerkDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.OFFLINE_PERK.getType(),
+                DataDictionaryEnum.OFFLINE_PERK.getCode());
+        if (offLinePerkDic != null) {
+            String offLinePerk = ObjectUtil.isEmpty(offLinePerkDic.getValue()) ? "0" : offLinePerkDic.getValue();
+            hlmBasicPerkDto.setOffLinePerk(offLinePerk);
+        }
+        DataDictionaryCustom agentPerkDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.AGENT_PERK.getType(),
+                DataDictionaryEnum.AGENT_PERK.getCode());
+        if (agentPerkDic != null) {
+            String agentPerk = ObjectUtil.isEmpty(agentPerkDic.getValue()) ? "0" : agentPerkDic.getValue();
+            hlmBasicPerkDto.setAgentPerk(agentPerk);
+        }
+        model.addAttribute("hlmBasicPerk", hlmBasicPerkDto);
+        return FebsUtil.view("modules/system/hlmBasicPerk");
+    }
 }

--
Gitblit v1.9.1