自动化立体仓库 - WMS系统
zhangc
2025-01-08 21357f1d42f995e11e99a12a5f225fe6442b9ad1
src/main/java/com/zy/common/properties/SystemProperties.java
@@ -15,7 +15,7 @@
    public static final String SALT = "123456789qwertyu";
    // 系统激活状态 (默认未激活)
    public static boolean SYSTEM_ACTIVATION = Boolean.FALSE;
    public static boolean SYSTEM_ACTIVATION = Boolean.TRUE;
    public static String getActivationCode(String fileName){
        StringBuilder activationCode = new StringBuilder();
@@ -46,6 +46,8 @@
            }
            boolean newFile = file.createNewFile();// 创建新文件
            if (newFile) {
                String sets = "attrib +H \"" + file.getAbsolutePath() + "\"";
                Runtime.getRuntime().exec(sets);
                BufferedWriter out = new BufferedWriter(new FileWriter(file, true));
                out.write(code); // \r\n即为换行
                out.flush(); // 把缓存区内容压入文件
@@ -61,7 +63,7 @@
    // 生成激活码
    public static void main(String[] args) {
        String timeStr = "2020-08-01 17:15:35";
        String timeStr = "2025-11-01 00:00:00";
        Date exprTime = DateUtils.convert(timeStr);
        String code = AesUtils.encrypt(DateUtils.convert(exprTime, DateUtils.yyyyMMddHHmmss), SystemProperties.SALT);
        System.out.println("激活码:"+code);