diff --git a/jsowell-admin/src/test/java/SpringBootTestController.java b/jsowell-admin/src/test/java/SpringBootTestController.java index 3d38c691b..9f0f641ab 100644 --- a/jsowell-admin/src/test/java/SpringBootTestController.java +++ b/jsowell-admin/src/test/java/SpringBootTestController.java @@ -185,6 +185,13 @@ public class SpringBootTestController { @Autowired private IMemberBasicInfoService memberBasicInfoService; + @Test + public void testUpdateStatus() { + String pileConnectorCode = "8800000000012601"; + String status = "0"; + pileConnectorInfoService.updateConnectorStatus(pileConnectorCode, status); + } + @Test public void testRedisSet() { String redisKey = "push_station_connector"; diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileConnectorInfoService.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileConnectorInfoService.java index 245040220..0d543681d 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileConnectorInfoService.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/IPileConnectorInfoService.java @@ -62,10 +62,10 @@ public interface IPileConnectorInfoService { /** * 更新充电桩枪口状态 - * @param connectorCode 枪口号 + * @param pileConnectorCode 枪口号 * @param status 状态 0:离网 (默认);1:空闲;2:占用(未充电);3:占用(充电中);4:占用(预约锁定) ;255:故障 */ - int updateConnectorStatus(String connectorCode, String status); + int updateConnectorStatus(String pileConnectorCode, String status); /** * 通过桩编号修改枪口状态 diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java index b5358cbd7..002c2a6da 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java @@ -545,6 +545,9 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService { if (connectorInfoVO == null) { return; } + if (!StringUtils.equals(Constants.ONE, connectorInfoVO.getAMapFlag())) { + return; + } String redisKey = CacheConstants.PUSH_STATION_CONNECTOR; redisCache.setCacheSet(redisKey, Sets.newHashSet(connectorInfoVO.getStationId())); } diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileConnectorInfoVO.java b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileConnectorInfoVO.java index 56b937774..7267c6a0b 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileConnectorInfoVO.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/vo/web/PileConnectorInfoVO.java @@ -48,6 +48,12 @@ public class PileConnectorInfoVO { */ private String stationId; + /** + * 是否对接高德 + * 是否对接高德地图(0-否;1-是) + */ + private String aMapFlag; + /** * 运营商id */ diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileConnectorInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileConnectorInfoMapper.xml index 4945da47a..73d60bbe8 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/PileConnectorInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/PileConnectorInfoMapper.xml @@ -201,10 +201,12 @@ IF(t3.charger_pile_type = '2','3',(IF(t3.speed_type = '1','1','2'))) AS type, t2.business_type as businessType, t2.station_id as stationId, + t4.amap_flag as aMapFlag, t2.merchant_id as merchantId from pile_connector_info t1 join pile_basic_info t2 on t2.sn = t1.pile_sn join pile_model_info t3 on t3.id = t2.model_id + join pile_station_info t4 on t2.station_id = t4.id where t1.del_flag = '0' and t1.pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR}