Commit ded29626 by 丁伟峰

Url直接在类方法上面映射

1 parent 8131f888
...@@ -32,8 +32,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -32,8 +32,7 @@ import org.springframework.web.bind.annotation.*;
* @author TrevorLink * @author TrevorLink
*/ */
@RestController @RestController
@RequestMapping("/order") public class OrderCreateController {
public class OrderController {
@Autowired @Autowired
private OrderService orderService; private OrderService orderService;
...@@ -44,7 +43,7 @@ public class OrderController { ...@@ -44,7 +43,7 @@ public class OrderController {
@Autowired @Autowired
private TimeRangeService timeRangeService; private TimeRangeService timeRangeService;
@PostMapping("/service/create") @PostMapping("/order/service/create")
public Result<?> createOrder(@Validated @RequestBody OrderCreateReqDTO orderCreateReqDTO) { public Result<?> createOrder(@Validated @RequestBody OrderCreateReqDTO orderCreateReqDTO) {
Result<?> res = null; Result<?> res = null;
try { try {
...@@ -55,7 +54,7 @@ public class OrderController { ...@@ -55,7 +54,7 @@ public class OrderController {
return res; return res;
} }
@GetMapping("/service/parameter") @GetMapping("/order/service/parameter")
public Result<?> getParameter() { public Result<?> getParameter() {
Result<?> res = null; Result<?> res = null;
try { try {
...@@ -66,7 +65,7 @@ public class OrderController { ...@@ -66,7 +65,7 @@ public class OrderController {
return res; return res;
} }
@PostMapping("/service/timerange") @PostMapping("/order/service/timerange")
public Result<?> getTimerange(@Validated @RequestBody TimeRangeReqDTO timeRangeReqDTO) { public Result<?> getTimerange(@Validated @RequestBody TimeRangeReqDTO timeRangeReqDTO) {
Result<?> res = null; Result<?> res = null;
try { try {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!