-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrderController.java
More file actions
58 lines (46 loc) · 1.51 KB
/
OrderController.java
File metadata and controls
58 lines (46 loc) · 1.51 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package com.sh.controller;
import com.sh.model.Order;
import com.sh.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 把今天最好的表现当作明天最新的起点..~
* いま 最高の表現 として 明日最新の始発..~
* Today the best performance as tomorrow newest starter!
* Created by IntelliJ IDEA.
* <p>
* author: xiaomo
* github: https://github.com/syoubaku
* email: hupengbest@163.com
* QQ_NO: 83387856
* Date: 2017/2/28 下午4:32
* Description:
* Copyright(©) 2017 by xiaomo.
**/
@RequestMapping("/order")
@RestController
public class OrderController {
private final OrderService service;
@Autowired
public OrderController(OrderService service) {
this.service = service;
}
@RequestMapping("/findAll")
public List<Order> findAll(){
return service.findAll();
}
@RequestMapping(value = "/insertOne",method = RequestMethod.GET)
public int insertOne(@RequestParam String key, @RequestParam String order){
System.out.println(order);
return service.insertOne(key,order);
}
@RequestMapping("/insertMore")
public int insertMore(@RequestParam String key,@RequestParam String orders){
return service.insertMore(key,orders);
}
@RequestMapping("/getSchedule/{serverId}")
public String getSchedule(@PathVariable int serverId){
return service.getSchedule(serverId);
}
}