Flutter advanced practical imitation of Bilibili APP

: ititit111222333

/ * * *@author Administrator
 */
@api (value = "order management ", tags = {" Related interface for order management "})
@RestController
@RequestMapping({"/order"})
public class OrderController {

    @Autowired
    private OrderService orderService;

    @apiOperation (value = "create order ", notes =" create order ", httpMethod = "POST")
    @PostMapping("/insert")
    public IMOOCJSONResult insert(@RequestBody SubmitOrderBO submitOrderBO) {
        orderService.insertOrder(submitOrderBO);
        return IMOOCJSONResult.ok();
    }

    @apiOperation (value = "update business order data ", notes =" update business order data ", httpMethod = "POST")
    @PostMapping("/update-by-id")
    public Integer updateById(@RequestParam String orderId) {
        Integer integer = orderService.updateState(orderId, OrderStatusEnum.WAIT_RECEIVE.type);
        if (integer == null) {
            return -1;
        }
        return HttpStatus.OK.value();
    }

    @apiOperation (value = "paytime polling interface ", notes =" paytime polling interface ", httpMethod = "GET")
    @GetMapping("/query-order-state")
    public IMOOCJSONResult queryOrderState(@RequestParam String orderId) {
        OrderStatus orderStatus = orderService.queryOrderState(orderId);
        returnIMOOCJSONResult.ok(orderStatus); }}Copy the code