Commit d2343ef0ac51be76f3d3d4b0fb1fde2104a73b79
1 parent
a696fd01
modify name
Showing
1 changed file
with
55 additions
and
55 deletions
src/main/java/com/diligrp/xtrade/order/controllor/OrderApiController.java
1 | -package com.diligrp.xtrade.order.controllor; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import javax.annotation.Resource; | |
6 | - | |
7 | -import org.springframework.validation.annotation.Validated; | |
8 | -import org.springframework.web.bind.annotation.RequestBody; | |
9 | -import org.springframework.web.bind.annotation.RequestMapping; | |
10 | -import org.springframework.web.bind.annotation.RequestMethod; | |
11 | -import org.springframework.web.bind.annotation.RestController; | |
12 | - | |
13 | -import com.diligrp.xtrade.order.domain.dto.OrderCreateRequestDto; | |
14 | -import com.diligrp.xtrade.order.domain.dto.OrderQueryRequestDto; | |
15 | -import com.diligrp.xtrade.order.domain.dto.OrderQueryResponseDto; | |
16 | -import com.diligrp.xtrade.order.service.Orderservice; | |
17 | -import com.diligrp.xtrade.shared.domain.Message; | |
18 | - | |
19 | -/** | |
20 | - * 订单相关接口实现 | |
21 | - * @author zhangxing | |
22 | - * @Date 2020/04/13 | |
23 | - */ | |
24 | -@RestController | |
25 | -@RequestMapping(value = "/sapi/order") | |
26 | -public class OrderApiControllor { | |
27 | - | |
28 | - @Resource | |
29 | - private Orderservice orderservice; | |
30 | - | |
31 | - /** | |
32 | - * 订单创建接口 | |
33 | - */ | |
34 | - @RequestMapping(value = "/createOrder",method = {RequestMethod.POST}) | |
35 | - public Message<Boolean> createOrder(@RequestBody @Validated OrderCreateRequestDto orderCreateRequestDto) { | |
36 | - orderservice.createOrder(orderCreateRequestDto); | |
37 | - return Message.<Boolean>builder().success(Boolean.TRUE); | |
38 | - } | |
39 | - | |
40 | - /** | |
41 | - * 订单列表接口 | |
42 | - */ | |
43 | - @RequestMapping(value = "/listOrders") | |
44 | - public Message<List<OrderQueryResponseDto>> listOrders(@RequestBody OrderQueryRequestDto orderQueryRequestDto) { | |
45 | - return Message.<List<OrderQueryResponseDto>>builder().success(orderservice.orderLists(orderQueryRequestDto)); | |
46 | - } | |
47 | - | |
48 | - /** | |
49 | - * 订单详情 | |
50 | - */ | |
51 | - @RequestMapping(value = "/orderDetail") | |
52 | - public Message<OrderQueryResponseDto> orderDetail(@RequestBody @Validated OrderQueryRequestDto orderQueryRequestDto) { | |
53 | - return Message.<OrderQueryResponseDto>builder().success(orderservice.orderDetail(orderQueryRequestDto)); | |
54 | - } | |
55 | -} | |
1 | +package com.diligrp.xtrade.order.controllor; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import javax.annotation.Resource; | |
6 | + | |
7 | +import org.springframework.validation.annotation.Validated; | |
8 | +import org.springframework.web.bind.annotation.RequestBody; | |
9 | +import org.springframework.web.bind.annotation.RequestMapping; | |
10 | +import org.springframework.web.bind.annotation.RequestMethod; | |
11 | +import org.springframework.web.bind.annotation.RestController; | |
12 | + | |
13 | +import com.diligrp.xtrade.order.domain.dto.OrderCreateRequestDto; | |
14 | +import com.diligrp.xtrade.order.domain.dto.OrderQueryRequestDto; | |
15 | +import com.diligrp.xtrade.order.domain.dto.OrderQueryResponseDto; | |
16 | +import com.diligrp.xtrade.order.service.Orderservice; | |
17 | +import com.diligrp.xtrade.shared.domain.Message; | |
18 | + | |
19 | +/** | |
20 | + * 订单相关接口实现 | |
21 | + * @author zhangxing | |
22 | + * @Date 2020/04/13 | |
23 | + */ | |
24 | +@RestController | |
25 | +@RequestMapping(value = "/sapi/order") | |
26 | +public class OrderApiController { | |
27 | + | |
28 | + @Resource | |
29 | + private Orderservice orderservice; | |
30 | + | |
31 | + /** | |
32 | + * 订单创建接口 | |
33 | + */ | |
34 | + @RequestMapping(value = "/createOrder",method = {RequestMethod.POST}) | |
35 | + public Message<Boolean> createOrder(@RequestBody @Validated OrderCreateRequestDto orderCreateRequestDto) { | |
36 | + orderservice.createOrder(orderCreateRequestDto); | |
37 | + return Message.<Boolean>builder().success(Boolean.TRUE); | |
38 | + } | |
39 | + | |
40 | + /** | |
41 | + * 订单列表接口 | |
42 | + */ | |
43 | + @RequestMapping(value = "/listOrders") | |
44 | + public Message<List<OrderQueryResponseDto>> listOrders(@RequestBody OrderQueryRequestDto orderQueryRequestDto) { | |
45 | + return Message.<List<OrderQueryResponseDto>>builder().success(orderservice.orderLists(orderQueryRequestDto)); | |
46 | + } | |
47 | + | |
48 | + /** | |
49 | + * 订单详情 | |
50 | + */ | |
51 | + @RequestMapping(value = "/orderDetail") | |
52 | + public Message<OrderQueryResponseDto> orderDetail(@RequestBody @Validated OrderQueryRequestDto orderQueryRequestDto) { | |
53 | + return Message.<OrderQueryResponseDto>builder().success(orderservice.orderDetail(orderQueryRequestDto)); | |
54 | + } | |
55 | +} | ... | ... |