xiaoyong931011
2023-09-15 0537e73efb9aba020fdc8cb48708bb51b46aaf57
src/main/java/cc/mrbird/febs/FebsShiroApplication.java
@@ -43,24 +43,24 @@
                .run(args);
    }
    @PostConstruct
    public void systemConstantsInit() {
        DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                DataDictionaryEnum.FEE_ADDRESS_KEY.getType(),
                DataDictionaryEnum.FEE_ADDRESS_KEY.getCode());
        String key = dataDictionaryCustom.getCode();
        key = StrUtil.toCamelCase(key);
        String value = dataDictionaryCustom.getValue();
        try {
            Field field = systemConstants.getClass().getDeclaredField(key);
            field.set(systemConstants, value);
            AppContants.FEE_ADDRESS_KEY.put("feeAddressKey",systemConstants.getFeeAddressKey());
            dataDictionaryCustom.setValue("isReady");
            dataDictionaryCustomMapper.updateById(dataDictionaryCustom);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
//    @PostConstruct
//    public void systemConstantsInit() {
//        DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
//                DataDictionaryEnum.FEE_ADDRESS_KEY.getType(),
//                DataDictionaryEnum.FEE_ADDRESS_KEY.getCode());
//        String key = dataDictionaryCustom.getCode();
//        key = StrUtil.toCamelCase(key);
//        String value = dataDictionaryCustom.getValue();
//        try {
//            Field field = systemConstants.getClass().getDeclaredField(key);
//            field.set(systemConstants, value);
//            AppContants.FEE_ADDRESS_KEY.put("feeAddressKey",systemConstants.getFeeAddressKey());
//            dataDictionaryCustom.setValue("isReady");
//            dataDictionaryCustomMapper.updateById(dataDictionaryCustom);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//    }
//    @PostConstruct