chenyi406 2 rokov pred
rodič
commit
afe5d7a1a6

+ 5 - 0
src/main/java/com/zy/omp/pojo/dto/MqttMsgDto.java

@@ -115,6 +115,11 @@ public class MqttMsgDto {
     public String getOpenNum() {
         if (r == null) return null;
         String[] res = r.split("OMP");
+        if (res.length > 1) {
+         return  res[1];
+        }
+        //兼容旧设备的IMEI格式
+        res=r.split("/");
         return res.length > 1 ? res[1] : null;
     }
 }