|
|
@@ -200,4 +200,25 @@ class OrderMain extends Backend |
|
|
|
return $this->view->fetch(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function newAdd($id =null){ |
|
|
|
$orderMain = $this->model->find($id); |
|
|
|
if (!$orderMain){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
$orderHotelList=(new \app\admin\model\OrderHotel()) |
|
|
|
->where("order_id","=",$id) |
|
|
|
->find(); |
|
|
|
|
|
|
|
$orderItemList=(new \app\admin\model\OrderItem()) |
|
|
|
->where("order_id","=",$id) |
|
|
|
->find(); |
|
|
|
$result = [ |
|
|
|
"orderMain"=>$orderMain, |
|
|
|
"hotel"=>$orderHotelList, |
|
|
|
"item"=>$orderItemList |
|
|
|
]; |
|
|
|
return json($result); |
|
|
|
} |
|
|
|
|
|
|
|
} |