From 68ed64849acb4ddc1b0a247484f23f38fb1aae2e Mon Sep 17 00:00:00 2001 From: GYJ <1157756119@qq.com> Date: Mon, 29 Jul 2024 14:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=98=E5=B7=A5=E7=99=BB=E5=BD=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/shopimpl/TbPlussShopStaffServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbPlussShopStaffServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbPlussShopStaffServiceImpl.java index 9859983d..1691e564 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbPlussShopStaffServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbPlussShopStaffServiceImpl.java @@ -40,6 +40,7 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; import java.time.Instant; import java.util.*; import java.io.IOException; @@ -111,6 +112,10 @@ public class TbPlussShopStaffServiceImpl implements TbPlussShopStaffService { throw new BadRequestException("请选择角色"); } + if (resources.getMaxDiscountAmount().compareTo(new BigDecimal(100000000L)) > 0) { + throw new BadRequestException("最大优惠金额过大"); + } + resources.setCreatedAt(Instant.now().toEpochMilli()); //添加收银系统后台账号