获取项目下指定条件组合的房间
请求方式: POST
请求路径:
https://prod.open-api.mysre.cn/rooms/get-by-conditions
| 参数名 | 参数位置 | 参数类型 | 必填 | 默认值 | 示例 | 描述 |
|---|---|---|---|---|---|---|
| project_id | body | string | 是 | 39ff70b4-7376-6fc3-0f15-2ce1824c7e8d | 项目ID | |
| conditions | body | string | 是 | ["and",["=","building_id","39ff70b8-6490-b22c-d02c-0745cf44bf66"],["=","floor","2"],["=","unit","1"]] | where 组合条件 | |
| tenant_code | query | string | 是 | zjalpha | 租户code |
{
"project_id": "39ffb2f0-001c-c30e-2770-166993df44d1",
"conditions": "{\"39ffbd54-d869-db9a-7cab-ffb98f478ebc\":[[\"=\",\"building_id\",\"39ffbd54-d869-db9a-7cab-ffb98f478ebc\"]],\"39ffbd54-dc21-7b9e-5d5e-1e432b31059e\":[[\"and\",[\"=\",\"building_id\",\"39ffbd54-dc21-7b9e-5d5e-1e432b31059e\"],[\"=\",\"unit\",2],[\"=\",\"floor\",3]],[\"and\",[\"=\",\"building_id\",\"39ffbd54-dc21-7b9e-5d5e-1e432b31059e\"],[\"=\",\"unit\",2],[\"=\",\"floor\",4]]]}"
}
{
"errcode": 0,
"errmsg": "请求成功",
"data": [
{
"room_id": "39ff93e5-8218-8ca5-3eff-70cc064409ee",
"building_id": "39ff70b8-6490-b22c-d02c-0745cf44bf66",
"unit": "1",
"floor": "2",
"no": "201",
"room_no": "201"
},
{
"room_id": "39ff93e5-821a-f216-4c79-79a675be4c7d",
"building_id": "39ff70b8-6490-b22c-d02c-0745cf44bf66",
"unit": "1",
"floor": "2",
"no": "202",
"room_no": "202"
},
{
"room_id": "39ff93e5-821c-7cc6-a313-35028d4931ec",
"building_id": "39ff70b8-6490-b22c-d02c-0745cf44bf66",
"unit": "1",
"floor": "2",
"no": "203",
"room_no": "203"
},
{
"room_id": "39ff93e5-821e-bbd3-20f2-a9cedee43d3c",
"building_id": "39ff70b8-6490-b22c-d02c-0745cf44bf66",
"unit": "1",
"floor": "2",
"no": "204",
"room_no": "204"
}
]
}
| 参数名 | 参数类型 | 描述 |
|---|---|---|
| errcode | number | |
| errmsg | string | |
| data | array | |
| data.room_id | string | 房间ID |
| data.building_id | string | |
| data.unit | string | |
| data.floor | string | |
| data.no | string | |
| data.room_no | string |
{
"errcode":4001,
"errmsg":"必填参数不能为空",
"data":null
}
| 参数名 | 参数类型 | 描述 |
|---|---|---|