From 9ec0a61f90ac2464eebc643bfe2d93ac9ba6e569 Mon Sep 17 00:00:00 2001
From: cgf <2156125618@qq.com>
Date: 星期六, 23 八月 2025 10:59:18 +0800
Subject: [PATCH] 折扣已完成现有需求2025/08/09

---
 service-fee/src/main/java/com/java110/fee/discount/impl/VacantHousingDiscountImpl.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/service-fee/src/main/java/com/java110/fee/discount/impl/VacantHousingDiscountImpl.java b/service-fee/src/main/java/com/java110/fee/discount/impl/VacantHousingDiscountImpl.java
index 8427c3b..df51592 100755
--- a/service-fee/src/main/java/com/java110/fee/discount/impl/VacantHousingDiscountImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/discount/impl/VacantHousingDiscountImpl.java
@@ -62,7 +62,7 @@
             }
         }
         //缂磋垂鍛ㄦ湡灏忎簬绌虹疆鎴挎墦鎶樿鍒欒嚦灏戝簲缂存湀浠斤紝灏变笉浜彈鎵撴姌浼樻儬
-        if (feeDiscountDto.getCycles() < month) {
+        if (Double.parseDouble(feeDiscountDto.getDiscountDesc()) < month) {
             ComputeDiscountDto computeDiscountDto = new ComputeDiscountDto();
             computeDiscountDto.setDiscountId(feeDiscountDto.getDiscountId());
             computeDiscountDto.setDiscountType(FeeDiscountDto.DISCOUNT_TYPE_DV);
@@ -88,7 +88,9 @@
         BigDecimal cycleDec = new BigDecimal(feeDiscountDto.getCycles());
 
         double discountPrice = priceDec.multiply(cycleDec).multiply(new BigDecimal(1.0 - rate)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
-
+        if (discountPrice < 0) {
+            return null;
+        }
         ComputeDiscountDto computeDiscountDto = new ComputeDiscountDto();
         computeDiscountDto.setDiscountId(feeDiscountDto.getDiscountId());
         computeDiscountDto.setDiscountType(FeeDiscountDto.DISCOUNT_TYPE_DV);

--
Gitblit v1.8.0