From c4d1b87049a825ffd29c5a7e074e14c8e288cbda Mon Sep 17 00:00:00 2001 From: yuyang Date: Wed, 13 Jul 2022 14:24:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9C=E7=AB=AF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E3=80=81=E8=AE=A2=E5=8D=95=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=A4=A7=E4=BA=8E=E7=AD=89=E4=BA=8E=E5=BC=80?= =?UTF-8?q?=E5=A7=8B=E6=97=B6=E9=97=B4=E3=80=81=E7=BB=93=E7=AE=97=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=A4=A7=E4=BA=8E500=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/order/api/XhpcPileOrderController.java | 8 ++++++++ .../impl/XhpcRealTimeOrderServiceImpl.java | 2 +- .../resources/mapper/XhpcStatisticsMapper.xml | 16 ++++++++-------- .../main/resources/mapper/XhpcAppUserMapper.xml | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java index 528bb293..7baa94a3 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/api/XhpcPileOrderController.java @@ -472,6 +472,14 @@ public class XhpcPileOrderController extends BaseController { }else{ money = powerPrice.add(servicePrice); } + if(money.compareTo(new BigDecimal(500)) > -1){ + logger.info("结算金额大于500>>"+money+">>>orderNo:" + orderNo); + xhpcChargeOrder.setStatus(2); + xhpcChargeOrder.setUpdateTime(new Date()); + xhpcChargeOrderService.updateXhpcChargeOrder(xhpcChargeOrder); + return R.fail(500,"无效订单号:"+orderNo); + } + //剩余的电费 BigDecimal surplusPowerPrice = powerPrice; //剩余的服务费 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 84ad97bf..ecb18af7 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 @@ -398,7 +398,7 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe } }else{ if(cacheMap.get("startTime") !=null) { - xhpcChargeOrder.setEndTime(DateUtil.parse(cacheMap.get("startTime").toString(), "yyyy-MM-dd HH:mm:ss")); + xhpcChargeOrder.setStartTime(DateUtil.parse(cacheMap.get("startTime").toString(), "yyyy-MM-dd HH:mm:ss")); } } } diff --git a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml index 4529be56..163fd844 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -45,7 +45,7 @@ format(ifnull(sum(activity_power_price_total),0), 2) activityPowerPriceTotal, format(ifnull(sum(activity_service_price_total),0), 2) activityServicePriceTotal, format(ifnull(sum(activity_total_price),0), 2) activityTotalPrice, - format(ifnull(sum(charging_degree),0), 2) chargingDegree, + format(ifnull(sum(charging_degree),0), 4) chargingDegree, format(ifnull(sum(charging_time),0), 2) chargingTime, ifnull(sum(charging_number),0) chargingNumber, format(ifnull(sum(power_price),0), 2) powerPrice, @@ -127,7 +127,7 @@ select - format(ifnull(sum(ss.charging_degree),0), 2) chargingDegree, + format(ifnull(sum(ss.charging_degree),0), 4) chargingDegree, format(ifnull(sum(ss.charging_time),0), 2) chargingTime, ifnull(sum(ss.charging_number),0) chargingNumber, format(ifnull(sum(ss.power_price),0), 2) powerPrice, @@ -265,7 +265,7 @@ select - format(ifnull(sum(ss.charging_degree),0), 2) chargingDegree, + format(ifnull(sum(ss.charging_degree),0), 4) chargingDegree, format(ifnull(sum(ss.charging_time),0), 2) chargingTime, ifnull(sum(ss.charging_number),0) chargingNumber, format(ifnull(sum(ss.power_price),0), 2) powerPrice, @@ -382,7 +382,7 @@ select - format(ifnull(sum(charging_degree),0), 2) chargingDegree, + format(ifnull(sum(charging_degree),0), 4) chargingDegree, format(ifnull(sum(charging_time),0), 2) chargingTime, ifnull(sum(charging_number),0) chargingNumber, format(ifnull(sum(power_price),0), 2) powerPrice, @@ -1060,7 +1060,7 @@ select - count(xau.app_user_id) userSum, + count(DISTINCT(xau.phone)) userSum, (select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time1} and tenant_id =#{tenantId}) one, (select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time2} and tenant_id =#{tenantId}) two, (select count(DISTINCT user_id) from xhpc_charge_order where create_time >= #{time3} and tenant_id =#{tenantId}) three,