ClientOrderController.java
1.81 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
package com.infoloop.tianting.controller;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.infoloop.tianting.model.common.OrderPageResult;
import com.infoloop.tianting.model.dto.OrderDbDTO;
import com.infoloop.tianting.model.dto.OrderDbDTO.OrderDto;
import com.infoloop.tianting.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
@Api(tags = "院区端订单")
@ApiSupport(order = 0)
@Slf4j
@Validated
@RestController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ClientOrderController {
private final OrderService orderService;
@ApiOperation(value = "院区端订单")
@PostMapping("/client/orders/pagination")
@ResponseStatus(HttpStatus.OK)
public OrderPageResult<OrderDto> getOrderByByPagination(@Valid @RequestBody OrderDbDTO.QueryOrderByPaginationDto queryOrderDto) {
return orderService.getOrdersByPagination(queryOrderDto);
}
@ApiOperation(value = "院区端已撤销订单")
@PostMapping("/client/orders/refund/pagination")
@ResponseStatus(HttpStatus.OK)
public OrderPageResult<OrderDto> getRefundOrderByByPagination(@Valid @RequestBody OrderDbDTO.QueryRefundOrderByPaginationDto queryOrderDto) {
return orderService.getRefundOrdersByPagination(queryOrderDto);
}
}