소스 검색

IMEI校验规则

zyg 2 년 전
부모
커밋
c60d2a6e48
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/main/java/cn/fastfun/controller/api/ApiAppDeviceController.java

+ 2 - 2
src/main/java/cn/fastfun/controller/api/ApiAppDeviceController.java

@@ -102,10 +102,10 @@ public class ApiAppDeviceController {
             throw new ApiRuntimeException("单体型号缺失");
         }
 
-        if (!param.getImei().substring(3, 5).equals(param.getPackModel().substring(0, 2))) {
+        if (!param.getImei().substring(1, 3).equals(param.getPackModel().substring(0, 2))) {
             throw new ApiRuntimeException("包型号与imei对应关系错误");
         }
-        if (!param.getImei().substring(3, 6).equals(param.getCellModel().substring(0, 3))) {
+        if (!param.getImei().substring(3, 6).equals(param.getCellModel().substring(1, 3))) {
             throw new ApiRuntimeException("单体型号与imei对应关系错误");
         }
         PackModel packModel = packModelService.getOne(Arrays.asList(QueryParamExp.eq("cellModel", param.getCellModel()),