|
|
@@ -180,6 +180,7 @@ public class StationServiceImpl extends MyBaseServiceImpl<StationMapper, Station
|
|
|
}
|
|
|
BeanUtils.copyProperties(stationVo, station);
|
|
|
|
|
|
+ DynamicDataSourceContextHolder.push("db-admin");
|
|
|
// 更新站点信息
|
|
|
updateByQueryWrapper(station, s -> new QueryWrapper<Station>().eq("station_id", station.getStationId()));
|
|
|
|
|
|
@@ -191,11 +192,11 @@ public class StationServiceImpl extends MyBaseServiceImpl<StationMapper, Station
|
|
|
connectorInfoService.updateBatchByQueryWrapper(connectorList, connectorInfo ->
|
|
|
new QueryWrapper<ConnectorInfo>().eq("connector_id", connectorInfo.getConnectorId()));
|
|
|
|
|
|
+ DynamicDataSourceContextHolder.poll();
|
|
|
+
|
|
|
// 将充电站相关数据写入KymCache
|
|
|
- // 手动切换数据源
|
|
|
- DynamicDataSourceContextHolder.push("db-admin");
|
|
|
KymCache.INSTANCE.putStationId2Name(Map.of(stationVo.getStationId(), stationVo.getStationName()));
|
|
|
- DynamicDataSourceContextHolder.poll();
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|