opt:1.增加操作台功能。2.调整数据刷新时间。
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
package org.nl.map.provider;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.api.map.api.MapAPI;
|
||||
import org.nl.map.station.entity.Station;
|
||||
import org.nl.map.station.service.MapStationService;
|
||||
import org.nl.response.WebResponse;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2026/3/9
|
||||
@@ -22,4 +28,12 @@ public class MapAPIProvider implements MapAPI {
|
||||
public WebResponse getAllStations() {
|
||||
return mapStationService.queryAllStation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getAllStationList() {
|
||||
List<Station> stations = mapStationService.list();
|
||||
return stations.stream()
|
||||
.map(station -> BeanUtil.beanToMap(station, false, true))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user