浏览代码

取消单个相机生成,单个也走批量生成

xiewj 2 年之前
父节点
当前提交
fe00d50daa

+ 31 - 31
4dkankan-utils-reg/src/main/java/com/fdkankan/reg/RegCodeUtil.java

@@ -65,30 +65,30 @@ public class RegCodeUtil {
             return null;
         }
     }
-    /***
-     * @description 获取激活数据
-     * @author: Xiewj
-     * @date: 2023/7/6 15:01
-     * @param:  plaintext 需要转换成对象的字符串
-     * @return:
-     **/
-    public static CamRegDto ParseRegeditCamCode(String machineCode , String plaintext){
-        try {
-            //解压
-            String code = DeflaterUtil.unzipString(plaintext);
-            log.info("相机注册码解压:{}",code);
-            String source = Crypt.decryptAES(code, true);
-            log.info("相机注册码解密:{}",source);
-            CamRegDto t = JSON.toJavaObject(JSONObject.parseObject(source) , CamRegDto.class);
-            if (ObjUtil.isNull(t.getMachineCode()) && !t.getMachineCode().equals(machineCode)){
-                throw new RuntimeException("校验失败");
-            }
-            return t;
-        }catch (Exception e){
-            e.printStackTrace();
-            return null;
-        }
-    }
+//    /***
+//     * @description 获取激活数据
+//     * @author: Xiewj
+//     * @date: 2023/7/6 15:01
+//     * @param:  plaintext 需要转换成对象的字符串
+//     * @return:
+//     **/
+//    public static CamRegDto ParseRegeditCamCode(String machineCode , String plaintext){
+//        try {
+//            //解压
+//            String code = DeflaterUtil.unzipString(plaintext);
+//            log.info("相机注册码解压:{}",code);
+//            String source = Crypt.decryptAES(code, true);
+//            log.info("相机注册码解密:{}",source);
+//            CamRegDto t = JSON.toJavaObject(JSONObject.parseObject(source) , CamRegDto.class);
+//            if (ObjUtil.isNull(t.getMachineCode()) && !t.getMachineCode().equals(machineCode)){
+//                throw new RuntimeException("校验失败");
+//            }
+//            return t;
+//        }catch (Exception e){
+//            e.printStackTrace();
+//            return null;
+//        }
+//    }
 
     /***
      * @description:生成相机激活码多个
@@ -134,13 +134,13 @@ public class RegCodeUtil {
         //生成安装注册码
         String s = GenRegeditCode(machineCode);
 
-        CamRegDto camRegDto1=new CamRegDto();
-        camRegDto1.setSn("00000001");
-        camRegDto1.setMachineCode(machineCode);
-        //生成相机注册码
-        String camCode = GenRegeditCamCode( JSON.toJSONString(camRegDto1));
-        //校验相机注册码
-        CamRegDto camRegDto3 = ParseRegeditCamCode(machineCode,camCode);
+//        CamRegDto camRegDto1=new CamRegDto();
+//        camRegDto1.setSn("00000001");
+//        camRegDto1.setMachineCode(machineCode);
+//        //生成相机注册码
+//        String camCode = GenRegeditCamCode( JSON.toJSONString(camRegDto1));
+//        //校验相机注册码
+//        CamRegDto camRegDto3 = ParseRegeditCamCode(machineCode,camCode);
 
 
         List<CamRegDto> list=new ArrayList<>();

+ 0 - 1
4dkankan-utils-reg/src/main/java/com/fdkankan/reg/dto/CamRegDto.java

@@ -7,7 +7,6 @@ import lombok.Data;
  */
 @Data
 public class CamRegDto {
-    private String machineCode;
      /**
      * {"SN": "SN000001", "TOSN": "", "OPTION": "ADD"}
      **/