| | |
| | | return configDao.listBySystemIdAndMaxVersion(systemId, version); |
| | | } |
| | | |
| | | public DetailSystemConfig getConfig(int id) { |
| | | return configDao.find(DetailSystemConfig.class, id); |
| | | } |
| | | |
| | | public void saveConfig(DetailSystemConfig config) { |
| | | configDao.save(config); |
| | | } |
| | | |
| | | public List<DetailSystemConfig> listConfig(Long systemId, String key) { |
| | | return configDao.list(systemId, key); |
| | | } |
| | | |
| | | @Cacheable(value = "configCache", key = "'getConfigAsMap-'+#system.id+'-'+#version") |
| | | public Map<String, String> getConfigAsMap(DetailSystem system, int version) { |
| | | Map<String, String> map = new HashMap<String, String>(); |