From 73a46e080a856cd469d323b4ecab15ffff86ebfc Mon Sep 17 00:00:00 2001 From: yuyang <2265829957@qq.com> Date: Mon, 13 Sep 2021 11:28:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=88=E7=AB=AF=E6=95=B0=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=A4=A7=E4=BA=8E8?= 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 a13ca125..50251e06 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 @@ -50,7 +50,12 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { @Transactional public AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile) { - Long chargingStationId = xhpcChargingPile.getChargingStationId(); + + if(xhpcChargingPile.getGunNumber() !=null || xhpcChargingPile.getGunNumber()>9){ + return AjaxResult.error("终端数量不能大于8"); + } + + Long chargingStationId = xhpcChargingPile.getChargingStationId(); //获取计费模型id Map stringObjectMap = xhpcChargingPileMapper.selectXhpcChargingStationById(chargingStationId); Long rateModelId = Long.parseLong(StringUtils.valueOf(stringObjectMap.get("rateModelId")));