update 推送高德

This commit is contained in:
Lemon
2023-07-18 08:33:34 +08:00
parent 9950506524
commit 6656f86c8c
5 changed files with 20 additions and 2 deletions

View File

@@ -185,6 +185,13 @@ public class SpringBootTestController {
@Autowired @Autowired
private IMemberBasicInfoService memberBasicInfoService; private IMemberBasicInfoService memberBasicInfoService;
@Test
public void testUpdateStatus() {
String pileConnectorCode = "8800000000012601";
String status = "0";
pileConnectorInfoService.updateConnectorStatus(pileConnectorCode, status);
}
@Test @Test
public void testRedisSet() { public void testRedisSet() {
String redisKey = "push_station_connector"; String redisKey = "push_station_connector";

View File

@@ -62,10 +62,10 @@ public interface IPileConnectorInfoService {
/** /**
* 更新充电桩枪口状态 * 更新充电桩枪口状态
* @param connectorCode 枪口号 * @param pileConnectorCode 枪口号
* @param status 状态 0离网 (默认)1空闲2占用未充电3占用充电中4占用预约锁定 255故障 * @param status 状态 0离网 (默认)1空闲2占用未充电3占用充电中4占用预约锁定 255故障
*/ */
int updateConnectorStatus(String connectorCode, String status); int updateConnectorStatus(String pileConnectorCode, String status);
/** /**
* 通过桩编号修改枪口状态 * 通过桩编号修改枪口状态

View File

@@ -545,6 +545,9 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
if (connectorInfoVO == null) { if (connectorInfoVO == null) {
return; return;
} }
if (!StringUtils.equals(Constants.ONE, connectorInfoVO.getAMapFlag())) {
return;
}
String redisKey = CacheConstants.PUSH_STATION_CONNECTOR; String redisKey = CacheConstants.PUSH_STATION_CONNECTOR;
redisCache.setCacheSet(redisKey, Sets.newHashSet(connectorInfoVO.getStationId())); redisCache.setCacheSet(redisKey, Sets.newHashSet(connectorInfoVO.getStationId()));
} }

View File

@@ -48,6 +48,12 @@ public class PileConnectorInfoVO {
*/ */
private String stationId; private String stationId;
/**
* 是否对接高德
* 是否对接高德地图0-否1-是)
*/
private String aMapFlag;
/** /**
* 运营商id * 运营商id
*/ */

View File

@@ -201,10 +201,12 @@
IF(t3.charger_pile_type = '2','3',(IF(t3.speed_type = '1','1','2'))) AS type, IF(t3.charger_pile_type = '2','3',(IF(t3.speed_type = '1','1','2'))) AS type,
t2.business_type as businessType, t2.business_type as businessType,
t2.station_id as stationId, t2.station_id as stationId,
t4.amap_flag as aMapFlag,
t2.merchant_id as merchantId t2.merchant_id as merchantId
from pile_connector_info t1 from pile_connector_info t1
join pile_basic_info t2 on t2.sn = t1.pile_sn join pile_basic_info t2 on t2.sn = t1.pile_sn
join pile_model_info t3 on t3.id = t2.model_id 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' where t1.del_flag = '0'
and t1.pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR} and t1.pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR}
</select> </select>