From 2d32c860f2a85bcbfd26631004d6288d67dbe37b Mon Sep 17 00:00:00 2001 From: macro Date: Thu, 5 Sep 2024 19:42:42 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BC=98=E6=83=A0=E5=88=B8?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E9=97=A8=E6=A7=9B=E4=B8=BA=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=E7=9A=84=E7=B2=BE=E5=BA=A6=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../portal/service/impl/UmsMemberCouponServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberCouponServiceImpl.java b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberCouponServiceImpl.java index a873196..2107365 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberCouponServiceImpl.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/UmsMemberCouponServiceImpl.java @@ -129,7 +129,7 @@ public class UmsMemberCouponServiceImpl implements UmsMemberCouponService { //判断是否满足优惠起点 //计算购物车商品的总价 BigDecimal totalAmount = calcTotalAmount(cartItemList); - if(now.before(endTime)&&totalAmount.subtract(minPoint).intValue()>=0){ + if(now.before(endTime)&&totalAmount.subtract(minPoint).floatValue()>=0){ enableList.add(couponHistoryDetail); }else{ disableList.add(couponHistoryDetail); @@ -142,7 +142,7 @@ public class UmsMemberCouponServiceImpl implements UmsMemberCouponService { productCategoryIds.add(categoryRelation.getProductCategoryId()); } BigDecimal totalAmount = calcTotalAmountByproductCategoryId(cartItemList,productCategoryIds); - if(now.before(endTime)&&totalAmount.intValue()>0&&totalAmount.subtract(minPoint).intValue()>=0){ + if(now.before(endTime)&&totalAmount.floatValue()>0&&totalAmount.subtract(minPoint).floatValue()>=0){ enableList.add(couponHistoryDetail); }else{ disableList.add(couponHistoryDetail); @@ -155,7 +155,7 @@ public class UmsMemberCouponServiceImpl implements UmsMemberCouponService { productIds.add(productRelation.getProductId()); } BigDecimal totalAmount = calcTotalAmountByProductId(cartItemList,productIds); - if(now.before(endTime)&&totalAmount.intValue()>0&&totalAmount.subtract(minPoint).intValue()>=0){ + if(now.before(endTime)&&totalAmount.floatValue()>0&&totalAmount.subtract(minPoint).floatValue()>=0){ enableList.add(couponHistoryDetail); }else{ disableList.add(couponHistoryDetail);