|
@@ -602,15 +602,20 @@ public class WbsParamController {
|
|
|
|
|
|
@Scheduled(fixedDelay = 30000)
|
|
|
public void monitor(){
|
|
|
- System.out.println("treeCode刷新检测"+ LocalDateTime.now());
|
|
|
- String tcu= this.redisTemplate.opsForValue().get("tcu");
|
|
|
- if(Func.isNotBlank(tcu)){
|
|
|
- assert tcu != null;
|
|
|
- Arrays.stream(tcu.split(",")).filter(StringUtils::isNumber).distinct().forEach(id->{
|
|
|
- this.service.treeCode(Long.parseLong(id),null);
|
|
|
- });
|
|
|
- this.redisTemplate.delete("tcu");
|
|
|
- }
|
|
|
+ /*System.out.println("treeCode刷新检测"+ LocalDateTime.now());*/
|
|
|
+ try {
|
|
|
+ String tcu= this.redisTemplate.opsForValue().get("tcu");
|
|
|
+ if(Func.isNotBlank(tcu)){
|
|
|
+ assert tcu != null;
|
|
|
+ Arrays.stream(tcu.split(",")).filter(StringUtils::isNumber).distinct().forEach(id->{
|
|
|
+ this.service.treeCode(Long.parseLong(id),null);
|
|
|
+ });
|
|
|
+ this.redisTemplate.delete("tcu");
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|