娄梦宁 3 years ago
parent
commit
a2b6905ebd
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      application/admin/controller/OrderMain.php

+ 21
- 0
application/admin/controller/OrderMain.php View File

@@ -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);
}

}

Loading…
Cancel
Save