GpsTestController.java
917 Bytes
package com.bsth.controller.test;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.bsth.service.StationRouteService;
@RestController
@RequestMapping("/test/gps")
public class GpsTestController {
@Autowired
StationRouteService stationRouteService;
@RequestMapping(value = "/route")
public List<Map<String, Object>> findRouteByLineId(@RequestParam int xl,@RequestParam int directions){
Map<String, Object> map = new HashMap<>();
map.put("line.id_eq", xl);
map.put("directions_eq", directions);
List<Map<String, Object>> list = stationRouteService.findPoints(map);
return list;
}
}