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.
 
 
 
 

52 lines
1.3 KiB

  1. <?php
  2. //Author:gaohan
  3. //Date:20160921
  4. // 新增子房型
  5. require_once "Api/ApiBase.php";
  6. require_once "Lib/Action/HTChildRoom.class.php";
  7. class AddChildRoom extends ApiBase{
  8. // 新增子房型
  9. function addChildRoom(){
  10. // $hotel_id=isset($_POST['hotel_id'])?$_POST['hotel_id']:(isset($_GET['hotel_id'])?$_GET['hotel_id']:""); // 不为空
  11. // set para_user_id = 1;
  12. // set para_hotel_id = 3;
  13. // set para_parent_room_type = 274;
  14. // set para_start_date = '2016-09-11';
  15. // set para_end_date = '2016-09-20';
  16. //set para_week_day = '2345671';
  17. // set para_run_status = 1;
  18. // set para_base_price = 500;
  19. // set para_person_limit = 2;
  20. // set para_breakfast = 206;
  21. // set para_room_name = '大床房(2人入住)';
  22. $roomModel=array();
  23. $roomModel['user_id']="1";
  24. $roomModel['hotel_id']="3";
  25. $roomModel['parent_room_type']="274";
  26. $roomModel['start_date']="2016-09-21";
  27. $roomModel['end_date']="2016-10-01";
  28. $roomModel['week_day']="2345671";
  29. $roomModel['run_status']="1";
  30. $roomModel['base_price']="501";
  31. $roomModel['person_limit']="2";
  32. $roomModel['breakfast']="206";
  33. $roomModel['room_name']="双床房(2人入住)";
  34. $addChildRoom = new HTChildRoom;
  35. $data=$addChildRoom->addChildRoom($roomModel);
  36. return $data;
  37. }
  38. }
  39. $addChildRoom = new addChildRoom;
  40. $data=$addChildRoom->addChildRoom();
  41. echo json_encode($data);