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.
 
 
 
 

28 lines
801 B

  1. <?php
  2. //Author:fuhc
  3. //Date:20160922
  4. // 新增基础房型
  5. require_once "Api/ApiBase.php";
  6. require_once "Lib/Action/HTBaseRoom.class.php";
  7. class AddBaseRoom extends ApiBase{
  8. // 新增基础房型
  9. function addBaseRoom(){
  10. $room_type_sale=isset($_POST['room_type_sale'])?$_POST['room_type_sale']:(isset($_GET['room_type_sale'])?$_GET['room_type_sale']:""); // 可为空
  11. $hotel_id=isset($_POST['hotel_id'])?$_POST['hotel_id']:(isset($_GET['hotel_id'])?$_GET['hotel_id']:""); // 不为空
  12. if($hotel_id==""){
  13. $data['code']="3";
  14. $data['info']="缺少hotel_id参数";
  15. return $data;
  16. }
  17. $baseRoom=new HTBaseRoom;
  18. $data=$baseRoom->addBaseRoom('1',$room_type_sale,$hotel_id);
  19. return $data;
  20. }
  21. }
  22. $addBaseRoom=new AddBaseRoom;
  23. $data=$addBaseRoom->addBaseRoom();
  24. echo json_encode($data);