Authored by qinchao

fix 默认值

@@ -86,19 +86,20 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { @@ -86,19 +86,20 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
86 //缓存 86 //缓存
87 private LocalCache localCache_switch = new LocalCache(); 87 private LocalCache localCache_switch = new LocalCache();
88 private static final String CACHE_KEY = "photoCheckExceedLimitCacheKey"; 88 private static final String CACHE_KEY = "photoCheckExceedLimitCacheKey";
  89 + private static final int DEFAULT_LIMIT_TIMES = 3;
89 90
90 @PostConstruct 91 @PostConstruct
91 private void init() { 92 private void init() {
92 localCache_switch.init(CACHE_KEY, 5, TimeUnit.MINUTES, (String s, Object o) -> { 93 localCache_switch.init(CACHE_KEY, 5, TimeUnit.MINUTES, (String s, Object o) -> {
93 logger.info("realNameAuthorizeServiceImpl init photoCheckExceedLimitCacheKey s = {}, o = {}", s, o); 94 logger.info("realNameAuthorizeServiceImpl init photoCheckExceedLimitCacheKey s = {}, o = {}", s, o);
94 - return configReader.getInt("ufo.user.photoCheckLimit",10); 95 + return configReader.getInt("ufo.user.photoCheckLimit",DEFAULT_LIMIT_TIMES);
95 }); 96 });
96 } 97 }
97 98
98 private int getPhotoCheckLimit(){ 99 private int getPhotoCheckLimit(){
99 Object value=localCache_switch.get(CACHE_KEY); 100 Object value=localCache_switch.get(CACHE_KEY);
100 if(null == value) { 101 if(null == value) {
101 - return 10; 102 + return DEFAULT_LIMIT_TIMES;
102 } 103 }
103 return (Integer) value; 104 return (Integer) value;
104 } 105 }