1234567891011121314151617181920212223242526272829 |
- package com.sf.controller;
- import com.sf.domain.CommonResult;
- import com.sf.domain.Order;
- import com.sf.service.OrderService;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- import javax.print.attribute.standard.PrinterURI;
- @RestController
- @Slf4j
- public class OrderController {
- @Autowired
- private OrderService orderService;
- @GetMapping(value = "/order/create")
- public CommonResult<Object> create(Order order){
- orderService.create(order);
- return new CommonResult<>(200,"订单创建成功");
- }
- }
|