GpsTestController.java 869 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 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);
		
		return stationRouteService.findRoutes(map);
	}
}