添加根据地图查绘图数据接口

This commit is contained in:
joylink_zhangsai 2020-11-27 18:13:38 +08:00
parent ab03faa02b
commit bbeaa73c14

View File

@ -3,6 +3,7 @@ package club.joylink.rtss.controller.publish;
import club.joylink.rtss.constants.RoleEnum;
import club.joylink.rtss.controller.advice.AuthenticateInterceptor;
import club.joylink.rtss.controller.advice.Role;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.services.IMapService;
import club.joylink.rtss.services.IReleaseService;
import club.joylink.rtss.services.local.LocalDataService;
@ -11,6 +12,7 @@ import club.joylink.rtss.vo.UserVO;
import club.joylink.rtss.vo.client.*;
import club.joylink.rtss.vo.client.local.LocalDataVO;
import club.joylink.rtss.vo.client.map.*;
import club.joylink.rtss.vo.client.map.newmap.MapGraphDataNewVO;
import club.joylink.rtss.vo.client.map.newmap.MapPSDVO;
import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO;
import club.joylink.rtss.vo.client.map.newmap.MapStationStandNewVO;
@ -71,6 +73,17 @@ public class MapController {
// return mapVO.getGraphData();
}
@ApiOperation("根据地图id查询绘图数据")
@GetMapping("/{id}/graphData")
public MapGraphDataNewVO getGraphData(@PathVariable Long id) {
MapVO mapVO = this.iMapService.getMapDetail(id);
if (mapVO.isDrawWay()) {
return mapVO.getGraphDataNew();
}
throw BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.exception(String.format("意外的老版地图[%s]", id));
}
@ApiOperation(value = "根据地图id查询地图数据")
@GetMapping(path = "/{id}/mapData")
public Object getMapDataById(@PathVariable Long id) {