提交代码

This commit is contained in:
zlwu committed 2025-09-03 11:45:24 +08:00
1 parent 4de2f07351
commit 99b771bb51
9 files changed
+84 -9

No files matched your search

+14 -4
View File
@@ -302,6 +302,7 @@ xgss:dormRoom:list
| floorNum | Integer | 否 | 楼层号,精确查询 |
| roomType | String | 否 | 房间类型(1标准间 2单人间 3套间) |
| roomStatus | String | 否 | 房间状态(0正常 1维修中 2停用) |
| sort | Integer | 否 | 排序号,精确查询 |
#### 返回结果
@@ -320,6 +321,7 @@ xgss:dormRoom:list
"actualBeds": 4,
"roomArea": 20.5,
"roomStatus": "0",
"sort": 0,
"remark": "标准四人间",
"createBy": 1,
"createTime": "2025-07-22 09:15:30",
@@ -337,6 +339,7 @@ xgss:dormRoom:list
"actualBeds": 4,
"roomArea": 20.5,
"roomStatus": "0",
"sort": 0,
"remark": "标准四人间",
"createBy": 1,
"createTime": "2025-07-22 09:15:30",
@@ -363,6 +366,7 @@ xgss:dormRoom:list
| actualBeds | Integer | 实际床位数 |
| roomArea | Double | 房间面积(平方米) |
| roomStatus | String | 房间状态(0正常 1维修中 2停用) |
| sort | Integer | 排序号,数字越小排序越靠前 |
| remark | String | 备注 |
| createBy | Long | 创建者ID |
| createTime | Date | 创建时间 |
@@ -371,11 +375,17 @@ xgss:dormRoom:list
#### 排序规则
房间列表按照以下顺序排序:
1. 优先按楼层号(floorNum)升序排列
2. 其次按房间名称(roomName)升序排列
房间列表按照以下优先级顺序排序:
1. **第一优先级**:按排序号(sort)升序排列
2. **第二优先级**:按楼层号(floorNum)升序排列
3. **第三优先级**:按房间名称(roomName)升序排列
这确保了在宿舍管理系统中房间按照从低楼层到高楼层的顺序展示,相同楼层的房间按照名称顺序排列,提供更直观的浏览体验。
**排序逻辑说明**:
- **自定义排序**:`sort` 字段允许管理员为房间设置自定义排序,数字越小排序越靠前
- **默认排序**:当 `sort` 值相同或为0时,按楼层和房间名称的自然顺序排列
- **灵活管理**:支持同一楼层内房间的个性化排序需求
这确保了宿舍管理系统既能保持传统的楼层顺序展示,又能支持管理员根据实际需要进行个性化排序调整。
#### 错误码
@@ -4531,6 +4531,7 @@ CREATE TABLE `xg_dorm_room` (
`actual_beds` int(11) DEFAULT '4' COMMENT '实际床位数',
`room_area` decimal(10,2) DEFAULT NULL COMMENT '房间面积(平方米)',
`room_status` char(1) DEFAULT '0' COMMENT '房间状态(0可用 1维修中 2停用)',
`sort` int(11) DEFAULT '0' COMMENT '排序号',
`deleted` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)',
`tenant_id` bigint(20) DEFAULT '0' COMMENT '租户编号',
`create_by` bigint(20) DEFAULT NULL COMMENT '创建者',