RoadSpeedController.java 1.54 KB
package com.bsth.controller;

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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.bsth.entity.RoadSpeed;
import com.bsth.service.RoadSpeedService;

/**
 * 
 * @ClassName: RoadSpeedController(路段限速控制器)
 * 
 * @Extends : BaseController
 * 
 * @Description: TODO(路段限速控制层)
 * 
 * @Author bsth@lq
 *
 * @Version 公交调度系统BS版 0.1
 * 
 */
@RestController
@RequestMapping("roadSpeed")
public class RoadSpeedController extends BaseController<RoadSpeed, Integer> {
	
	@Autowired
	private RoadSpeedService service;
	
	/*@RequestMapping(value="all", method = RequestMethod.GET)
	public List<RoadSpeed> allRoadSpeed(){
		return service.allRoadSpeed();
	}*/
	
	@RequestMapping(value="save", method = RequestMethod.POST)
	public Map<String, Object> save(@RequestParam Map<String, Object> map){
		return service.roadSpeedSave(map);
	}
	
	@RequestMapping(value="update", method = RequestMethod.POST)
	public Map<String, Object> update(@RequestParam Map<String, Object> map){
		return service.update(map);
	}
	
	@RequestMapping(value="findById", method = RequestMethod.GET)
	public RoadSpeed findById(@RequestParam(defaultValue = "id") Integer id){
		return service.findId(id);
	}
}