|
123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- //Author:fuhc
- //Date:20160919
- //房型信息
-
- require_once __DIR__.'/../HotelLib.php';
-
- class HTRoomInfo extends HotelLib{
-
-
- // 得到房型信息
- function getRoomList($hotel_id,$start_date,$sale_status,$current,$page_size,$base_room_type){
- //$sql="CALL ht_get_run_room_info(".$hotel_id.",'".$start_date."','".$sale_status."')";
- $sql="CALL ht_get_run_room_info('{$hotel_id}','{$start_date}','{$sale_status}','{$current}','{$page_size}','{$base_room_type}')";
- writeLog(__FUNCTION__." sql= ".$sql);
- $data=array();
- $rowset=$this->DBTool->execProcedure($sql);
- $data['code']=$rowset['code'];
- $data['info']=$rowset['info'];
- $data['room_list']=isset($rowset['rowset'])?$rowset['rowset']:array();
-
-
- return $data;
- }
- // 修改子房型
- function modifyChildRoom($hotel_id,$room_type,$parent_room_type,$data_child_room_name,$checkin_people,$user_id,$breakfast){
- $sql = "update opera_hotel_room set update_user_id = {$user_id},room_name = '{$data_child_room_name}', occupancy_limit ={$checkin_people},breakfast_include = '{$breakfast}' where hotel_id = {$hotel_id} and parent_room_type ={$parent_room_type} and room_type = {$room_type}";
- writeLog(__FUNCTION__." sql= ".$sql);
- $rowset = $this->DBTool->execSql($sql);
- $data['code'] = $rowset['code'];
- $data['info'] = $rowset['info'];
- $data['room_name'] = $data_child_room_name;
- return $data;
- }
- }
- //$obj= new HTRoomInfo;
- //$data = $obj ->getRoomList('235', '2016-11-10', '-1', '1', '5');
- //echo json_encode($data);
-
|