CarParkRealController.java
1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.bsth.controller.real;
import com.bsth.data.real_park.CarParkRealHandler;
import com.bsth.entity.real.RealCarPark;
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 java.util.Collection;
import java.util.Map;
/**
* Created by panzhao on 2017/9/14.
*/
@RestController
@RequestMapping("car_park_real")
public class CarParkRealController {
@Autowired
CarParkRealHandler carParkRealHandler;
@RequestMapping("bus")
public Collection<RealCarPark> busAll(){
return CarParkRealHandler.allBus();
}
@RequestMapping(value = "real_change", method = RequestMethod.POST)
public Map<String, Object> realChange(@RequestParam String s, @RequestParam String d){
return carParkRealHandler.realChange(s, d);
}
@RequestMapping(value = "add_car2berth", method = RequestMethod.POST)
public Map<String, Object> addCar2Berth(@RequestParam String berthName, @RequestParam String nbbm){
return carParkRealHandler.addCar2Berth(berthName, nbbm);
}
@RequestMapping(value = "clear_berth", method = RequestMethod.POST)
public Map<String, Object> clear_berth(@RequestParam String b){
return carParkRealHandler.clear_berth(b);
}
}