opt:1.站点名称排序。2.添加外部API查询站点接口。
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package org.nl.map.provider;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.api.map.api.MapAPI;
|
||||
import org.nl.map.station.service.MapStationService;
|
||||
import org.nl.response.WebResponse;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author dsh
|
||||
* 2026/3/9
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class MapAPIProvider implements MapAPI {
|
||||
|
||||
@Resource
|
||||
private MapStationService mapStationService;
|
||||
|
||||
@Override
|
||||
public WebResponse getAllStations() {
|
||||
return mapStationService.queryAllStation();
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.map.station.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -23,6 +24,6 @@ public class MapStationServiceImpl extends ServiceImpl<StationMapper, Station> i
|
||||
|
||||
@Override
|
||||
public WebResponse queryAllStation() {
|
||||
return WebResponse.requestParamOk(stationMapper.selectList(new QueryWrapper<>()));
|
||||
return WebResponse.requestParamOk(stationMapper.selectList(new LambdaQueryWrapper<>(Station.class).orderByAsc(Station::getStation_name)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user