Authored by qinchao

fix 默认值

... ... @@ -86,19 +86,20 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
//缓存
private LocalCache localCache_switch = new LocalCache();
private static final String CACHE_KEY = "photoCheckExceedLimitCacheKey";
private static final int DEFAULT_LIMIT_TIMES = 3;
@PostConstruct
private void init() {
localCache_switch.init(CACHE_KEY, 5, TimeUnit.MINUTES, (String s, Object o) -> {
logger.info("realNameAuthorizeServiceImpl init photoCheckExceedLimitCacheKey s = {}, o = {}", s, o);
return configReader.getInt("ufo.user.photoCheckLimit",10);
return configReader.getInt("ufo.user.photoCheckLimit",DEFAULT_LIMIT_TIMES);
});
}
private int getPhotoCheckLimit(){
Object value=localCache_switch.get(CACHE_KEY);
if(null == value) {
return 10;
return DEFAULT_LIMIT_TIMES;
}
return (Integer) value;
}
... ...