|
@@ -10,6 +10,8 @@ import com.chuanghai.ihotel.service.RoomRealtimeStatuService;
|
|
|
import com.chuanghai.ihotel.vo.RoomRealDataStatuVO;
|
|
import com.chuanghai.ihotel.vo.RoomRealDataStatuVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestHeader;
|
|
import org.springframework.web.bind.annotation.RequestHeader;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -60,4 +62,21 @@ public class RoomRealtimeStatuController {
|
|
|
List<RoomRealDataStatuVO> realData = roomRealtimeStatuService.realData(request);
|
|
List<RoomRealDataStatuVO> realData = roomRealtimeStatuService.realData(request);
|
|
|
return CommonResult.ok().setResult(realData);
|
|
return CommonResult.ok().setResult(realData);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 脏房修改为空闲房间
|
|
|
|
|
+ * @param adminToken
|
|
|
|
|
+ * @param statuId
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @apiNote 注意,只有当房间为脏房时,房间状态才可以被置为空闲房间
|
|
|
|
|
+ */
|
|
|
|
|
+ @AdminLoginCheck
|
|
|
|
|
+ @PutMapping("clean/{statuId}")
|
|
|
|
|
+ public CommonResult<String> cleanByStatuId(@RequestHeader("admin_token") String adminToken,
|
|
|
|
|
+ @PathVariable("statuId") Long statuId) {
|
|
|
|
|
+ roomRealtimeStatuService.cleanByStatuId(statuId);
|
|
|
|
|
+
|
|
|
|
|
+ return CommonResult.ok();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|