wangqifan 4 tahun lalu
induk
melakukan
950c9a01be

+ 5 - 2
src/main/java/com/izouma/tcg/service/customizeStore/WithdrawApplyService.java

@@ -55,8 +55,11 @@ public class WithdrawApplyService {
                         .now().atStartOfDay(), LocalDate.now().atTime(LocalTime.MAX)).stream()
                 .map(WithdrawApply::getMoney).reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
         BigDecimal total = todayWithdraw.add(money);
-        if (total.compareTo(BigDecimal.valueOf(200)) > 0) {
-            throw new BusinessException("今日提现超过200元,已达今日上限.");
+        if (total.compareTo(BigDecimal.valueOf(20000)) > 0) {
+            throw new BusinessException("今日提现超过20000元,已达今日上限.");
+        }
+        if (money.compareTo(BigDecimal.valueOf(1)) < 0) {
+            throw new BusinessException("最低不可以小于1元");
         }
         Store store = storeRepo.findFirstByUserId(userId);
         MemberInfo memberInfo = memberInfoRepo.findAllByUserId(userId);