mirror of
https://github.com/FreeeBird/hotel.git
synced 2025-05-06 19:49:26 +08:00
update test
This commit is contained in:
parent
5751736f5d
commit
ff7797da9b
@ -41,11 +41,13 @@ public class UserOrderController {
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/add")
|
||||
public int addOrder(int orderTypeId,String orderType, int userId,String name, String phone,int roomTypeId, String roomType,
|
||||
public AjaxResult addOrder(int orderTypeId,String orderType, int userId,String name, String phone,int roomTypeId, String roomType,
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date orderDate, Integer orderDays, Double orderCost){
|
||||
Order order = new Order(orderTypeId,orderType,userId,name,phone,roomTypeId,
|
||||
roomType,orderDate,orderDays, OrderStatus.UNPAID.getCode(),orderCost);
|
||||
return orderService.addOrder(order);
|
||||
if(orderService.addOrder(order)!=1)
|
||||
return ResponseUtil.failed("创建订单失败");
|
||||
return ResponseUtil.success("预订成功");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user