From e7b6ec6db090b347867903eb0babc9d085b293aa Mon Sep 17 00:00:00 2001 From: wen <1455474577@qq.com> Date: Fri, 18 Feb 2022 18:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=A5=E5=8F=A3=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E9=97=B4=EF=BC=8C=E9=98=B2=E6=AD=A2=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=BA=BF=E7=A8=8B=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=94=9F=E6=88=90=E5=A5=BD=E4=BA=8C=E7=BB=B4=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../station/service/XhpcChargingPileServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ac92f1d3..021acf7e 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 @@ -478,7 +478,7 @@ public class XhpcChargingPileServiceImpl extends BaseService implements IXhpcCha //开启多个线程,并行执行操作 //generate qrcode for every terminal ThreadPoolExecutor executor = - new ThreadPoolExecutor(5, 40, 200, TimeUnit.MILLISECONDS, new ArrayBlockingQueue(40)); + new ThreadPoolExecutor(30, 40, 200, TimeUnit.MILLISECONDS, new ArrayBlockingQueue(40)); for (XhpcTerminal xhpcTerminal : xhpcTerminalList) { executor.execute(() -> { //获取场站名称: @@ -504,6 +504,11 @@ public class XhpcChargingPileServiceImpl extends BaseService implements IXhpcCha QrImgUtils.uploadImg(xhpcTerminal, xhpcTerminal.getSerialNumber(), environment, xhpcImgMapper, chargingStationName, gunNumber, letterMap, pileNumber.toString()); }); } + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } return AjaxResult.success(); } }