From 82ebad630627487834b535e8dc8fb60c606d158a Mon Sep 17 00:00:00 2001 From: yuyang Date: Mon, 13 Jun 2022 14:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A2=E5=8D=95=E7=BB=93?= =?UTF-8?q?=E7=AE=97=EF=BC=8C=E9=87=91=E9=A2=9D=E4=B8=BA0=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E8=BF=9B=E5=85=A5=E6=B4=BB=E5=8A=A8=E7=BB=93?= =?UTF-8?q?=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/XhpcActivityDiscountMapper.xml | 2 +- .../order/service/impl/XhpcRealTimeOrderServiceImpl.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcActivityDiscountMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcActivityDiscountMapper.xml index 33ea97d2..a37ba141 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcActivityDiscountMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcActivityDiscountMapper.xml @@ -200,7 +200,7 @@ and us.userType=#{params.userType} - and us.userAccount=#{params.userAccount} + and us.userAccount like CONCAT('%',#{params.userAccount},'%') diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java index 37ed5a0f..b59a0d1f 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcRealTimeOrderServiceImpl.java @@ -335,6 +335,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder); return AjaxResult.success(); } + //总金额 BigDecimal money = powerPrice.add(servicePrice); //总服务费 servicePrice @@ -537,7 +538,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe //判断是否有活动 logger.info("<<<<<<<<<<<<<<<判断是否有活动>>>>>>>>>>>>>>>>>"+xhpcChargeOrder.getSerialNumber()); boolean judge =false; - if(source==UserTypeUtil.INTERNET_TYPE && internetSerialNumber!=null && xhpcChargeOrder.getStartTime()!=null && xhpcChargeOrder.getEndTime()!=null){ + if(source==UserTypeUtil.INTERNET_TYPE && internetSerialNumber!=null && xhpcChargeOrder.getStartTime()!=null && xhpcChargeOrder.getEndTime()!=null && money.compareTo(new BigDecimal(0))>=1){ xhpcHistoryOrder.setChargingMode(xhpcChargeOrder.getUserId()+""); xhpcHistoryOrder.setInternetSerialNumber(xhpcChargeOrder.getInternetSerialNumber()); Double totalPower = xhpcHistoryOrder.getTotalPower(); @@ -806,7 +807,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe } } // - if ( !UserTypeUtil.INTERNET_TYPE.equals(source) && xhpcChargeOrder.getStartTime()!=null && xhpcChargeOrder.getEndTime()!=null) { + if ( !UserTypeUtil.INTERNET_TYPE.equals(source) && xhpcChargeOrder.getStartTime()!=null && xhpcChargeOrder.getEndTime()!=null && money.compareTo(new BigDecimal(0))>=1) { //查询是否有活动 List activityDiscountTime = xhpcRealTimeOrderMapper.getActivityDiscountTime(userId, DateUtil.formatDateTime(startTime), source, xhpcChargeOrder.getChargingStationId(), xhpcChargeOrder.getTenantId()); if(activityDiscountTime !=null && activityDiscountTime.size()>0){