You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

40 lines
1.5 KiB

  1. <?php
  2. //Author:fuhc
  3. //Date:20160919
  4. //房型信息
  5. require_once __DIR__.'/../HotelLib.php';
  6. class HTRoomInfo extends HotelLib{
  7. // 得到房型信息
  8. function getRoomList($hotel_id,$start_date,$sale_status,$current,$page_size,$base_room_type){
  9. //$sql="CALL ht_get_run_room_info(".$hotel_id.",'".$start_date."','".$sale_status."')";
  10. $sql="CALL ht_get_run_room_info('{$hotel_id}','{$start_date}','{$sale_status}','{$current}','{$page_size}','{$base_room_type}')";
  11. writeLog(__FUNCTION__." sql= ".$sql);
  12. $data=array();
  13. $rowset=$this->DBTool->execProcedure($sql);
  14. $data['code']=$rowset['code'];
  15. $data['info']=$rowset['info'];
  16. $data['room_list']=isset($rowset['rowset'])?$rowset['rowset']:array();
  17. return $data;
  18. }
  19. // 修改子房型
  20. function modifyChildRoom($hotel_id,$room_type,$parent_room_type,$data_child_room_name,$checkin_people,$user_id,$breakfast){
  21. $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}";
  22. writeLog(__FUNCTION__." sql= ".$sql);
  23. $rowset = $this->DBTool->execSql($sql);
  24. $data['code'] = $rowset['code'];
  25. $data['info'] = $rowset['info'];
  26. $data['room_name'] = $data_child_room_name;
  27. return $data;
  28. }
  29. }
  30. //$obj= new HTRoomInfo;
  31. //$data = $obj ->getRoomList('235', '2016-11-10', '-1', '1', '5');
  32. //echo json_encode($data);