| | |
| | | inoutSysConf.setProgressOut("REGISTER-WEIGHT_EMPTY-HANDLE-WEIGHT_FULL-RECORD"); |
| | | this.saveSysConfData(inoutSysConf); |
| | | |
| | | this.flushInoutSysConfCache(inoutSysConf); |
| | | this.flushInoutSysConfCache(); |
| | | } |
| | | |
| | | /** |
| | |
| | | inoutSysConfMapper.update(data, new UpdateWrapper<InoutSysConf>().eq("dept_id", data.getDeptId())); |
| | | } |
| | | |
| | | this.flushInoutSysConfCache(data); |
| | | this.flushInoutSysConfCache(); |
| | | } |
| | | |
| | | /** |
| | | * 设置缓存 |
| | | * |
| | | * @param data |
| | | */ |
| | | public void flushInoutSysConfCache(InoutSysConf data) { |
| | | String key = RedisConst.buildKey(data.getDeptId(), Constant.CACHE_INOUT_SYS_CONF); |
| | | redisCache.setCacheObject(key, data); |
| | | public void flushInoutSysConfCache() { |
| | | List<InoutSysConf> list = getSysConfData(); |
| | | if(null == list || list.isEmpty()){ |
| | | return; |
| | | } |
| | | for (InoutSysConf conf : list) { |
| | | String key = RedisConst.buildKey(conf.getDeptId(), Constant.CACHE_INOUT_SYS_CONF); |
| | | redisCache.setCacheObject(key, conf); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | InoutSysConf conf = (InoutSysConf) redisCache.getCacheObject(key); |
| | | if (null == conf) { |
| | | conf = getInoutSysConf(deptId); |
| | | flushInoutSysConfCache(conf); |
| | | flushInoutSysConfCache(); |
| | | } |
| | | return conf; |
| | | } |