Order1Controller.java 764 B

123456789101112131415161718192021222324252627282930
  1. package com.futu.course.orders.controller;
  2. import com.futu.course.common.entity.R;
  3. import com.futu.course.orders.dto.OrdersDto;
  4. import com.futu.course.orders.service.Order1Service;
  5. import org.springframework.web.bind.annotation.PostMapping;
  6. import org.springframework.web.bind.annotation.RequestBody;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import javax.annotation.Resource;
  10. @RestController
  11. @RequestMapping("/order1")
  12. public class Order1Controller {
  13. @Resource
  14. private Order1Service order1Service;
  15. // 添加订单
  16. @PostMapping("/addorder1")
  17. public R addorder1(@RequestBody OrdersDto ordersDto){
  18. return order1Service.AddOrder1(ordersDto);
  19. }
  20. }