|
|
@@ -5,10 +5,8 @@ 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;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
/**
|
|
|
* @Author: chenyizong
|
|
|
@@ -27,4 +25,11 @@ public class ClientController {
|
|
|
clientService.addOrder(orderVO);
|
|
|
return ResponseVO.buildSuccess(orderVO);
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/order/all")
|
|
|
+ public ResponseEntity<?> retrieveAllOrders(){
|
|
|
+ return Result.ok(clientService.retrieveOrders());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|