| | |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.dapp.dto.SystemConstants; |
| | | import cc.mrbird.febs.dapp.dto.SystemConstantsAddress; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.dapp.enumerate.DataDictionaryEnum; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | |
| | | @Autowired |
| | | private SystemConstants systemConstants; |
| | | |
| | | @Autowired |
| | | private SystemConstantsAddress systemConstantsAddress; |
| | | |
| | | public static void main(String[] args) { |
| | | new SpringApplicationBuilder(FebsShiroApplication.class) |
| | | .web(WebApplicationType.SERVLET) |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | |
| | | DataDictionaryCustom addressDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.FEE_ADDRESS.getType(), |
| | | DataDictionaryEnum.FEE_ADDRESS.getCode()); |
| | | String addressKey = addressDic.getCode(); |
| | | addressKey = StrUtil.toCamelCase(addressKey); |
| | | String valueAddress = addressDic.getValue(); |
| | | try { |
| | | Field field = systemConstantsAddress.getClass().getDeclaredField(addressKey); |
| | | field.set(systemConstantsAddress, valueAddress); |
| | | AppContants.FEE_ADDRESS.put("feeAddress",systemConstantsAddress.getFeeAddress()); |
| | | addressDic.setValue("isReady"); |
| | | dataDictionaryCustomMapper.updateById(addressDic); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |