| ruoyi-system/src/main/java/com/ruoyi/system/model/Device.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
ruoyi-system/src/main/java/com/ruoyi/system/model/Device.java
@@ -88,11 +88,8 @@ * @return DeviceType 枚举,如果 type 无效则返回 OTHER */ public DeviceType getDeviceType() { if (type == null || type < 1 || type > 10) { log.warn("设备类型值无效,deviceId: {}, type: {}", id, type); return DeviceType.OTHER; } // 数据库值减1得到枚举序号 return DeviceType.values()[type - 1]; DeviceType value = DeviceType.values()[type ]; return value; } }