28 lines
964 B
Java
28 lines
964 B
Java
|
package com.sky.controller.user;
|
||
|
|
||
|
import com.sky.dto.OrdersSubmitDTO;
|
||
|
import com.sky.result.Result;
|
||
|
import com.sky.service.OrderService;
|
||
|
import com.sky.vo.OrderSubmitVO;
|
||
|
import io.swagger.annotations.Api;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
@RestController
|
||
|
@Api("用户订单相关接口")
|
||
|
@Slf4j
|
||
|
@RequestMapping("/user/order")
|
||
|
public class OrderController {
|
||
|
@Autowired
|
||
|
private OrderService orderService;
|
||
|
@PostMapping("/submit")
|
||
|
public Result<OrderSubmitVO> submit(@RequestBody OrdersSubmitDTO ordersSubmitDTO){
|
||
|
OrderSubmitVO orderSubmitVO=orderService.submit(ordersSubmitDTO);
|
||
|
return Result.success(orderSubmitVO);
|
||
|
}
|
||
|
}
|