| 123456789101112131415161718192021222324252627282930 |
- package com.example.hotel.controller.user;
- import com.example.hotel.bl.user.ClientService;
- import com.example.hotel.util.Result;
- import com.example.hotel.vo.OrderVO;
- import com.example.hotel.vo.ResponseVO;
- 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;
- /**
- * @Author: chenyizong
- * @Date: 2020-02-29
- */
- @RestController()
- @RequestMapping("/api")
- public class ClientController {
- @Autowired
- private ClientService clientService;
- @PostMapping("/hotel/reserve")
- public ResponseVO reserveHotel(@RequestBody OrderVO orderVO){
- clientService.addOrder(orderVO);
- return ResponseVO.buildSuccess(orderVO);
- }
- }
|