From 8193d7a169186361d5c71fd1143abd041842b408 Mon Sep 17 00:00:00 2001 From: yuyang <2265829957@qq.com> Date: Fri, 17 Sep 2021 18:27:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B7=BB=E5=8A=A0=E6=A1=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station/service/XhpcChargingPileServiceImpl.java | 8 ++++---- .../xhpc/charging/station/utils/img/QrImgUtils.java | 10 +--------- .../main/resources/mapper/XhpcChargingPileMapper.xml | 6 +++--- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java index a38a9f16..2df489ae 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingPileServiceImpl.java @@ -73,7 +73,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { return AjaxResult.error("终端数量不能大于26"); } if(xhpcChargingPile.getSerialNumber() ==null || xhpcChargingPile.getSerialNumber().length()!=14){ - return AjaxResult.error("桩编号14"); + return AjaxResult.error("桩编号14位"); } Long chargingStationId = xhpcChargingPile.getChargingStationId(); //获取计费模型id @@ -98,9 +98,9 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { } } //插入redis 桩的编号 - HashSet noSet = new HashSet<>(); - noSet.add(serialNumber); - powerPileService.addPileWhitelist(chargingStationId, noSet); +// HashSet noSet = new HashSet<>(); +// noSet.add(serialNumber); +// powerPileService.addPileWhitelist(chargingStationId, noSet); return AjaxResult.success(); } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/QrImgUtils.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/QrImgUtils.java index 2e85c1cc..e982e5d0 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/QrImgUtils.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/utils/img/QrImgUtils.java @@ -37,15 +37,7 @@ public class QrImgUtils { //3.拼接成完整图片 //3.1生成指定规则的图片名 String finallyImgFileName = DateUtil.format(new Date(), "yyyyMMddHHmmssSSS") + serialNumber + ".png"; -// new ImageUtil().createXhImg( -// new File(environment.getProperty("oss.bottomImg")), -// QrCode, -// new File(environment.getProperty("oss.bottomLogoImg")), -// serialNumber, -// new File(environment.getProperty("oss.fullImgDestPath")+finallyImgFileName), -// chargingStationName, -// String.valueOf(xhpcTerminal.getNumber()), -// String.valueOf(letterMap.get(forIndex))); + new ImageUtil().fastCreateImg( new File(environment.getProperty("oss.bottomImg")), QrCode, diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml index 1682a26d..1e795ec9 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcChargingPileMapper.xml @@ -176,7 +176,7 @@ update_by, - remark + remark, brand_model @@ -259,7 +259,7 @@ #{updateBy}, - #{remark} + #{remark}, #{brandModel} @@ -355,6 +355,6 @@