diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java index bf9a68ed..b703a357 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/controller/XhpcChargingPileController.java @@ -1,13 +1,10 @@ package com.xhpc.charging.station.controller; -import com.xhpc.charging.station.pojo.XhpcImg; +import com.xhpc.charging.station.service.IXhpcChargingPileService; import com.xhpc.common.core.web.controller.BaseController; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.core.web.page.TableDataInfo; -import com.xhpc.charging.station.service.IXhpcChargingPileService; import com.xhpc.common.domain.XhpcChargingPile; -import com.xhpc.common.domain.XhpcTerminal; -import org.apache.poi.hssf.record.DVALRecord; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -33,7 +30,6 @@ public class XhpcChargingPileController extends BaseController { * @param name 桩名称 * @return */ - //@PreAuthorize(hasPermi = "system:station:list") @GetMapping("/list") public TableDataInfo list(String name, Integer type, String serialNumber, Long chargingStationId) { diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java index 69173998..b05b17c1 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcChargingPileMapper.java @@ -88,4 +88,11 @@ public interface XhpcChargingPileMapper { */ int updateXhpcTerminal(@Param("chargingPileId") Long chargingPileId); + /** + * 统计改场站的终端 + * @param chargingStationId + * @return + */ + int countXhpcTerminal(@Param("chargingStationId") Long chargingStationId); + } diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcImgMapper.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcImgMapper.java index 118bd3fe..6c77e0f0 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcImgMapper.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/mapper/XhpcImgMapper.java @@ -1,6 +1,5 @@ package com.xhpc.charging.station.mapper; -import com.xhpc.charging.station.pojo.XhpcImg; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java index 1cf88afc..f5e22cb2 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/IXhpcChargingPileService.java @@ -1,9 +1,7 @@ package com.xhpc.charging.station.service; -import com.xhpc.charging.station.pojo.XhpcImg; import com.xhpc.common.core.web.domain.AjaxResult; import com.xhpc.common.domain.XhpcChargingPile; -import com.xhpc.common.domain.XhpcTerminal; import java.util.List; import java.util.Map; 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 84ed434a..a38a9f16 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 @@ -1,6 +1,5 @@ package com.xhpc.charging.station.service; -import com.alibaba.druid.sql.visitor.functions.Char; import com.xhpc.charging.station.mapper.XhpcChargingPileMapper; import com.xhpc.charging.station.mapper.XhpcChargingStationMapper; import com.xhpc.charging.station.mapper.XhpcImgMapper; @@ -32,14 +31,12 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { @Autowired private PowerPileService powerPileService; - //上传图片全局变量 @Autowired private Environment environment; - //上传图片Mapper @Autowired private XhpcImgMapper xhpcImgMapper; @Autowired - XhpcChargingStationMapper xhpcChargingStationMapper; + private XhpcChargingStationMapper xhpcChargingStationMapper; //字母集合 private static Map letterMap; @@ -75,7 +72,9 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { if(xhpcChargingPile.getGunNumber() ==null || xhpcChargingPile.getGunNumber()>26){ return AjaxResult.error("终端数量不能大于26"); } - + if(xhpcChargingPile.getSerialNumber() ==null || xhpcChargingPile.getSerialNumber().length()!=14){ + return AjaxResult.error("桩编号14"); + } Long chargingStationId = xhpcChargingPile.getChargingStationId(); //获取计费模型id Map stringObjectMap = xhpcChargingPileMapper.selectXhpcChargingStationById(chargingStationId); @@ -93,35 +92,45 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { Long chargingPileId = xhpcChargingPile.getChargingPileId(); if (xhpcChargingPile.getGunNumber() > 0) { + int number = xhpcChargingPileMapper.countXhpcTerminal(chargingStationId); for (int i = 1; i <= xhpcChargingPile.getGunNumber(); i++) { - XhpcTerminal xhpcTerminal = new XhpcTerminal(); - xhpcTerminal.setChargingStationId(chargingStationId); - xhpcTerminal.setChargingPileId(chargingPileId); - xhpcTerminal.setName(xhpcChargingPile.getName() + "-" + (i)); - xhpcTerminal.setSerialNumber(serialNumber + "0" + i); - xhpcTerminal.setPileSerialNumber(serialNumber); - xhpcTerminal.setWorkStatus(2); - xhpcTerminal.setStatus(0); - xhpcTerminal.setRateModelId(rateModelId); - xhpcTerminal.setNumber(99); - xhpcTerminalMapper.addXhpcTerminal(xhpcTerminal); - - //获取场站名称: - String chargingStationName = xhpcChargingStationMapper.selectXhpcChargingStationById(xhpcTerminal.getChargingStationId()).getName(); - //生成最终的完整图片,并上传 - QrImgUtils.uploadImg(xhpcTerminal, xhpcTerminal.getSerialNumber(),environment,xhpcImgMapper,chargingStationName,i,letterMap); - + addXhpcTerminal(xhpcChargingPile.getName(), chargingStationId, rateModelId, serialNumber, chargingPileId, i,number+1); } } - //插入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(); } + private void addXhpcTerminal(String name, Long chargingStationId, Long rateModelId, String serialNumber, Long chargingPileId, int i, int number) { + + XhpcTerminal xhpcTerminal = new XhpcTerminal(); + xhpcTerminal.setChargingStationId(chargingStationId); + xhpcTerminal.setChargingPileId(chargingPileId); + xhpcTerminal.setName(name + "-" + (i)); + if(i>9){ + xhpcTerminal.setSerialNumber(serialNumber + i); + }else{ + xhpcTerminal.setSerialNumber(serialNumber + "0" + i); + } + xhpcTerminal.setPileSerialNumber(serialNumber); + xhpcTerminal.setWorkStatus(2); + xhpcTerminal.setStatus(0); + xhpcTerminal.setRateModelId(rateModelId); + xhpcTerminal.setNumber(number); + xhpcTerminalMapper.addXhpcTerminal(xhpcTerminal); + + //获取场站名称: + String chargingStationName = xhpcChargingStationMapper.selectXhpcChargingStationById(xhpcTerminal.getChargingStationId()).getName(); + //生成最终的完整图片,并上传 + QrImgUtils.uploadImg(xhpcTerminal, xhpcTerminal.getSerialNumber(),environment,xhpcImgMapper,chargingStationName,i,letterMap); + + } + @Override + @Transactional public AjaxResult updateXhpcChargingPile(XhpcChargingPile xhpcChargingPile) { Long chargingPileId = xhpcChargingPile.getChargingPileId(); @@ -139,33 +148,19 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { if (!xhpcChargingPile.getGunNumber().equals(xhpc.getGunNumber())) { //删除之前的终端 xhpcChargingPileMapper.updateXhpcTerminal(chargingPileId); - + int number = xhpcChargingPileMapper.countXhpcTerminal(xhpcChargingPile.getChargingStationId()); String serialNumber = xhpcChargingPile.getSerialNumber(); Long rateModelId = xhpcChargingPile.getRateModelId(); Long chargingStationId = xhpcChargingPile.getChargingStationId(); if (xhpcChargingPile.getGunNumber() > 0) { for (int i = 1; i <= xhpcChargingPile.getGunNumber(); i++) { - XhpcTerminal xhpcTerminal = new XhpcTerminal(); - xhpcTerminal.setChargingStationId(chargingStationId); - xhpcTerminal.setChargingPileId(chargingPileId); - xhpcTerminal.setName(serialNumber + "-" + (i)); - String num = serialNumber + "0" + i; - xhpcTerminal.setSerialNumber(num); - xhpcTerminal.setPileSerialNumber(serialNumber); - xhpcTerminal.setWorkStatus(2); - xhpcTerminal.setStatus(0); - xhpcTerminal.setRateModelId(rateModelId); - xhpcTerminalMapper.addXhpcTerminal(xhpcTerminal); -// //生成二维码图片,并上传 -// QrImgUtils.uploadImg(xhpcTerminal,num,environment,xhpcImgMapper); - + addXhpcTerminal(xhpcChargingPile.getName(), chargingStationId, rateModelId, serialNumber, chargingPileId, i,number+1); } - } //插入redis 桩的编号 -// HashSet noSet = new HashSet<>(); -// noSet.add(serialNumber); -// powerPileService.addPileWhitelist(chargingStationId, noSet); + HashSet noSet = new HashSet<>(); + noSet.add(serialNumber); + powerPileService.addPileWhitelist(chargingStationId, noSet); } xhpcChargingPileMapper.updaeXhpcChargingPile(xhpcChargingPile); return AjaxResult.success(); @@ -185,8 +180,8 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { @Override + @Transactional public AjaxResult updateStatus(Long chargingPileId, Integer status) { - XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId); xhpc.setStatus(status); xhpcChargingPileMapper.updaeXhpcChargingPile(xhpc); @@ -194,6 +189,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService { } @Override + @Transactional public int updateXhpcChargingPileById(Long chargingPileId) { XhpcChargingPile xhpc = xhpcChargingPileMapper.selectXhpcChargingPileById(chargingPileId); diff --git a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java index 25da444a..a95e2742 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java +++ b/xhpc-modules/xhpc-charging-station/src/main/java/com/xhpc/charging/station/service/XhpcChargingStationServiceImpl.java @@ -712,6 +712,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi } @Override + @Transactional public AjaxResult updateXhpcRateTime(XhpcChargingStationDto xhpcChargingStationDto) { //电站id不能为空 if (xhpcChargingStationDto.getChargingStationId() == null) { 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 019574b8..1682a26d 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 @@ -354,4 +354,7 @@ where charging_pile_id = #{chargingPileId} + diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcImgMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcImgMapper.xml index a7f94bca..a876f90b 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcImgMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcImgMapper.xml @@ -8,7 +8,7 @@ INSERT INTO xhpc_img(url,terminal_id) VALUES(#{imgUrl},#{terminalId}) - SELECT url,terminal_id as terminalId FROM xhpc_img where 1=1 diff --git a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml index 7a76282b..534aeded 100644 --- a/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml +++ b/xhpc-modules/xhpc-charging-station/src/main/resources/mapper/XhpcTerminalMapper.xml @@ -177,7 +177,10 @@ remark, - rate_model_id + rate_model_id, + + + number @@ -224,7 +227,10 @@ #{remark}, - #{rateModelId} + #{rateModelId}, + + + #{number} diff --git a/xhpc-modules/xhpc-charging-station/src/test/java/com/xhpc/test/TestQrUtil.java b/xhpc-modules/xhpc-charging-station/src/test/java/com/xhpc/test/TestQrUtil.java index 2c46e4d1..83b09c5e 100644 --- a/xhpc-modules/xhpc-charging-station/src/test/java/com/xhpc/test/TestQrUtil.java +++ b/xhpc-modules/xhpc-charging-station/src/test/java/com/xhpc/test/TestQrUtil.java @@ -1,12 +1,5 @@ package com.xhpc.test; -import cn.hutool.core.date.DateUtil; -import com.aliyun.oss.OSSClient; -import com.xhpc.charging.station.utils.QRCodeUtil; -import org.junit.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.env.Environment; - import java.io.File; import java.util.Date; diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheOrderData.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheOrderData.java index e0323f06..548e20d1 100644 --- a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheOrderData.java +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/data/redis/CacheOrderData.java @@ -380,4 +380,45 @@ public class CacheOrderData extends BaseData { this.status = status; } + @Override + public String toString() { + + return "CacheOrderData{" + + "orderNo='" + orderNo + '\'' + + ", pileNo='" + pileNo + '\'' + + ", gunId='" + gunId + '\'' + + ", startTime='" + startTime + '\'' + + ", endTime='" + endTime + '\'' + + ", t1Price=" + t1Price + + ", t1PowerQuantity=" + t1PowerQuantity + + ", t1LossQuantity=" + t1LossQuantity + + ", t1Cost=" + t1Cost + + ", t2Price=" + t2Price + + ", t2PowerQuantity=" + t2PowerQuantity + + ", t2LossQuantity=" + t2LossQuantity + + ", t2Cost=" + t2Cost + + ", t3Price=" + t3Price + + ", t3PowerQuantity=" + t3PowerQuantity + + ", t3LossQuantity=" + t3LossQuantity + + ", t3Cost=" + t3Cost + + ", t4Price=" + t4Price + + ", t4PowerQuantity=" + t4PowerQuantity + + ", t4LossQuantity=" + t4LossQuantity + + ", t4Cost=" + t4Cost + + ", electricMeterStart=" + electricMeterStart + + ", electricMeterEnd=" + electricMeterEnd + + ", totalPowerQuantity=" + totalPowerQuantity + + ", totalLossPowerQuantity=" + totalLossPowerQuantity + + ", cost=" + cost + + ", vinNormal='" + vinNormal + '\'' + + ", transactionFlag='" + transactionFlag + '\'' + + ", transactionDatetime='" + transactionDatetime + '\'' + + ", stopReason='" + stopReason + '\'' + + ", cardNo='" + cardNo + '\'' + + ", startSoc=" + startSoc + + ", endSoc=" + endSoc + + ", status=" + status + + '}'; + } + } diff --git a/xhpc-modules/xhpc-order/pom.xml b/xhpc-modules/xhpc-order/pom.xml index dd856f2c..51c3b412 100644 --- a/xhpc-modules/xhpc-order/pom.xml +++ b/xhpc-modules/xhpc-order/pom.xml @@ -21,6 +21,17 @@ + + + org.springframework.boot + spring-boot-starter-test + test + + + junit + junit + test + com.alibaba.cloud diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java index 3de42e69..7aca54b6 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java @@ -6,6 +6,7 @@ import com.xhpc.common.core.web.page.TableDataInfo; import com.xhpc.order.api.XhpcChargeOrderController; import com.xhpc.order.service.IXhpcStopChargingOrderService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Scheduled; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -29,7 +30,6 @@ public class XhpcStopChargingOrderController extends BaseController { @GetMapping("/list") public TableDataInfo list(Long userId, Long chargingStationId, Long terminalId){ - startPage(); return getDataTable(iXhpcStopChargingOrderService.list(userId, chargingStationId, terminalId)); } @@ -37,10 +37,11 @@ public class XhpcStopChargingOrderController extends BaseController { /** * 停止充电 * @param userId - * @param serialNumber 终端编码 + * @param terminalSerialNumber 终端编码 * @param chargingOrderId 充电id * @return */ + @Scheduled(cron = "0 59 23 * * ?") @GetMapping("/stopUp") public AjaxResult stopUp(@RequestParam Long userId, @RequestParam String terminalSerialNumber, @RequestParam Long chargingOrderId){ 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 553e908b..8c5809c6 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 @@ -5,6 +5,7 @@ import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import com.xhpc.common.api.SmsService; import com.xhpc.common.core.web.domain.AjaxResult; +import com.xhpc.common.data.redis.CacheOrderData; import com.xhpc.common.data.redis.CacheRealtimeData; import com.xhpc.common.redis.service.RedisService; import com.xhpc.order.domain.*; @@ -473,7 +474,8 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService { xhpcOrderRedisRecord.setLt5alerted(cacheMap.get("lt5alerted").toString()); } if(cacheMap.get("orderData") !=null){ - xhpcOrderRedisRecord.setOrderData(cacheMap.get("orderData").toString()); + CacheOrderData cacheOrderData = (CacheOrderData)cacheMap.get("orderData"); + xhpcOrderRedisRecord.setOrderData(cacheOrderData.toString()); } xhpcOrderRedisRecord.setCreateTime(date); xhpcChargeOrderService.addXhpcOrderRedisRecord(xhpcOrderRedisRecord); diff --git a/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml b/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml index 678126e3..5571b791 100644 --- a/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml +++ b/xhpc-modules/xhpc-order/src/main/resources/bootstrap.yml @@ -23,6 +23,6 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} -#logging: -# level: -# com.xhpc.order.mapper: debug \ No newline at end of file +logging: + level: + com.xhpc.order.mapper: debug \ No newline at end of file diff --git a/xhpc-modules/xhpc-order/src/test/java/com/xhpc/order/service/ServiceTest.java b/xhpc-modules/xhpc-order/src/test/java/com/xhpc/order/service/ServiceTest.java new file mode 100644 index 00000000..0cd1573c --- /dev/null +++ b/xhpc-modules/xhpc-order/src/test/java/com/xhpc/order/service/ServiceTest.java @@ -0,0 +1,41 @@ +package com.xhpc.order.service; + +import org.junit.After; +import org.junit.Before; +import org.junit.jupiter.api.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import java.util.Map; + +/** + * @author yuyang + * @date 2021/9/14 16:42 + * @Version 1.0 + */ +@SpringBootTest +public class ServiceTest { + + @Autowired + private IXhpcChargeOrderService xhpcChargeOrderService; + + + @Before + public void setUp() throws Exception { + System.out.println("+++++++++++++++++初始化+++++++++++++"); + } + + @Test + public void test(){ + Map orderMessage = xhpcChargeOrderService.getPromotion(); + System.out.println("orderMessage :"+orderMessage.toString()); + System.out.println("111111111111111111111111"); + } + + @After + public void tearDown() throws Exception { + System.out.println("释放资源,执行当前测试类的每个测试方法后执行"); + } +} diff --git a/xhpc-modules/xhpc-power-pile/src/test/java/com/xhpc/pp/mapper/NormalTest.java b/xhpc-modules/xhpc-power-pile/src/test/java/com/xhpc/pp/mapper/NormalTest.java index 6cda6fa3..8861e63a 100644 --- a/xhpc-modules/xhpc-power-pile/src/test/java/com/xhpc/pp/mapper/NormalTest.java +++ b/xhpc-modules/xhpc-power-pile/src/test/java/com/xhpc/pp/mapper/NormalTest.java @@ -14,7 +14,8 @@ import org.springframework.boot.test.context.SpringBootTest; public class NormalTest { @Autowired - XhpcMessageMapper xhpcMessageMapper; + private XhpcMessageMapper xhpcMessageMapper; + @Test public void test02(){ @@ -24,15 +25,15 @@ public class NormalTest { @Test public void test03(){ - XhpcMessage xhpcMessage = new XhpcMessage(); - xhpcMessage.setContent("hello world"); - int result = xhpcMessageMapper.insertItemsBy(xhpcMessage); - if(result != 0){ - System.out.println("insert successfully!!"); - }else { - System.out.println("insert failed!!"); - } - System.out.println("latch successfully!!"); +// XhpcMessage xhpcMessage = new XhpcMessage(); +// xhpcMessage.setContent("hello world"); +// int result = xhpcMessageMapper.insertItemsBy(xhpcMessage); +// if(result != 0){ +// System.out.println("insert successfully!!"); +// }else { +// System.out.println("insert failed!!"); +// } +// System.out.println("latch successfully!!"); } }