From 69025a3687c6dc6260e894c6bfb793178ef8fea2 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 02 Mar 2023 15:46:24 +0800
Subject: [PATCH] 增加活动公告
---
src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java b/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
index 694e8eb..b3e0dec 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
@@ -76,6 +76,12 @@
return new FebsResponse().fail().message("请刷新页面重试");
}
+ DataDictionaryCustom chargeAmountDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.CHARGE_AMOUNT.getType(),
+ DataDictionaryEnum.CHARGE_AMOUNT.getCode());
+ if(ObjectUtil.isEmpty(chargeAmountDic)){
+ return new FebsResponse().fail().message("请刷新页面重试");
+ }
+
String giveState = adminAgentAmountDto.getGiveState();
if(1 == Integer.parseInt(giveState)){
if(ObjectUtil.isEmpty(adminAgentAmountDto.getActivityBulletin())){
@@ -86,6 +92,12 @@
}
if(BigDecimal.ZERO.compareTo(new BigDecimal(adminAgentAmountDto.getGiveAmount())) > 0){
return new FebsResponse().fail().message("请输入正确的赠送金额");
+ }
+ if(ObjectUtil.isEmpty(adminAgentAmountDto.getChargeAmount())){
+ return new FebsResponse().fail().message("请输入正确的充值金额");
+ }
+ if(BigDecimal.ZERO.compareTo(new BigDecimal(adminAgentAmountDto.getChargeAmount())) > 0){
+ return new FebsResponse().fail().message("请输入正确的充值金额");
}
}
@@ -101,6 +113,9 @@
giveAmountDic.setValue(adminAgentAmountDto.getGiveAmount());
dataDictionaryCustomMapper.updateById(giveAmountDic);
+ chargeAmountDic.setValue(adminAgentAmountDto.getChargeAmount());
+ dataDictionaryCustomMapper.updateById(chargeAmountDic);
+
return new FebsResponse().success().message("操作成功");
}
--
Gitblit v1.9.1