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(); } }