From 16623625678536fe212a66b50fdac2319719892d Mon Sep 17 00:00:00 2001 From: yuyang Date: Mon, 25 Apr 2022 09:18:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=88=E7=AB=AF=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=EF=BC=8C=E6=94=BE=E5=BC=80=E8=AE=A2=E5=8D=95=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E7=9F=AD=E4=BF=A1=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/XhpcRealTimeOrderServiceImpl.java | 36 +++++++++---------- .../resources/mapper/XhpcStatisticsMapper.xml | 5 ++- 2 files changed, 22 insertions(+), 19 deletions(-) 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 3527911e..870aa1c0 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 @@ -1201,24 +1201,24 @@ public class XhpcRealTimeOrderServiceImpl extends BaseService implements IXhpcRe public void run() { try{ logger.info("<<<<<<<<<<<<<<<<进行入短信发送>>>>>>>>>>>>>>>>>"); -// if(!UserTypeUtil.INTERNET_TYPE.equals(source)){ -// if(userMessage !=null && userMessage.get("phone") != null){ -// if("1".equals(xhpcChargingPile.get("type").toString())){ -// HashMap paramMap = new HashMap<>(); -// paramMap.put("elec", xhpcChargeOrder.getEndSoc()); -// paramMap.put("sumMoney", balance.toString()); -// paramMap.put("phone", userMessage.get("phone").toString()); -// paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询小华充电小程序,谢谢。"); -// smsService.sendNotice(paramMap); -// }else { -// HashMap paramMap = new HashMap<>(); -// paramMap.put("sumMoney", balance.toString()); -// paramMap.put("phone", userMessage.get("phone").toString()); -// paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,总费用为:" + balance.toString() + "元,充电费用明细,请查询小华充电小程序,谢谢。"); -// smsService.sendNotice(paramMap); -// } -// } -// } + if(!UserTypeUtil.INTERNET_TYPE.equals(source)){ + if(userMessage !=null && userMessage.get("phone") != null){ + if("1".equals(xhpcChargingPile.get("type").toString())){ + HashMap paramMap = new HashMap<>(); + paramMap.put("elec", xhpcChargeOrder.getEndSoc()); + paramMap.put("sumMoney", balance.toString()); + paramMap.put("phone", userMessage.get("phone").toString()); + paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,电量为:" + xhpcChargeOrder.getEndSoc() + "%,总费用为:" + balance + "元,充电费用明细,请查询小华充电小程序,谢谢。"); + smsService.sendNotice(paramMap); + }else { + HashMap paramMap = new HashMap<>(); + paramMap.put("sumMoney", balance.toString()); + paramMap.put("phone", userMessage.get("phone").toString()); + paramMap.put("content", "【小华停止充电】尊敬的用户,你的爱车已停止充电,总费用为:" + balance.toString() + "元,充电费用明细,请查询小华充电小程序,谢谢。"); + smsService.sendNotice(paramMap); + } + } + } }catch (Exception e){ logger.info("<<<<<<<<<<<<<<<<发送短信失败>>>>>>>>>>>>>>>>>"); } 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 7339c629..36fefe23 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml +++ b/xhpc-modules/xhpc-order/src/main/resources/mapper/XhpcStatisticsMapper.xml @@ -434,7 +434,10 @@ terminal_id as terminalId, name as terminalName from xhpc_terminal - where 1=1 + where del_flag =0 + + and charging_station_id=#{chargingStationId} + and charging_station_id in (select charging_station_id from xhpc_charging_station where operator_id=#{userId})