From bac072f518a357363ae3f201beb665021cd75efc Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 03 Apr 2023 18:13:51 +0800
Subject: [PATCH] 关于积分凭证

---
 src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 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 796674d..3d2d302 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java
@@ -291,7 +291,41 @@
             String levelAchievePercent = ObjectUtil.isEmpty(levelAchievePercentDic.getValue()) ? "0" : levelAchievePercentDic.getValue();
             hlmVoucherSetDto.setLevelAchievePercent(levelAchievePercent);
         }
+        DataDictionaryCustom scorePoolCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                GreenScoreEnum.SCORE_POOL_CNT.getType(),
+                GreenScoreEnum.SCORE_POOL_CNT.getCode());
+        if (scorePoolCntDic != null) {
+            String scorePoolCnt = ObjectUtil.isEmpty(scorePoolCntDic.getValue()) ? "0" : scorePoolCntDic.getValue();
+            hlmVoucherSetDto.setScorePoolCnt(scorePoolCnt);
+        }
         model.addAttribute("hlmVoucherSetDto", hlmVoucherSetDto);
         return FebsUtil.view("modules/system/hlmVoucherSet");
     }
+
+    /**
+     * 一键卖出
+     * @param model
+     * @return
+     */
+    @GetMapping("hlmVoucherButton")
+    @RequiresPermissions("hlmVoucherButton:view")
+    public String hlmVoucherButton(Model model) {
+        HlmVoucherButtonDto hlmVoucherButtonDto = new HlmVoucherButtonDto();
+        DataDictionaryCustom scorePriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                GreenScoreEnum.SCORE_PRICE.getType(),
+                GreenScoreEnum.SCORE_PRICE.getCode());
+        if (scorePriceDic != null) {
+            String scorePrice = ObjectUtil.isEmpty(scorePriceDic.getValue()) ? "0" : scorePriceDic.getValue();
+            hlmVoucherButtonDto.setScorePrice(scorePrice);
+        }
+        DataDictionaryCustom voucherOnOffDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                GreenScoreEnum.VOUCHER_ON_OFF.getType(),
+                GreenScoreEnum.VOUCHER_ON_OFF.getCode());
+        if (voucherOnOffDic != null) {
+            String voucherOnOff = ObjectUtil.isEmpty(voucherOnOffDic.getValue()) ? "0" : voucherOnOffDic.getValue();
+            hlmVoucherButtonDto.setVoucherOnOff(voucherOnOff);
+        }
+        model.addAttribute("hlmVoucherButtonDto", hlmVoucherButtonDto);
+        return FebsUtil.view("modules/system/hlmVoucherButton");
+    }
 }

--
Gitblit v1.9.1