|
|
@@ -97,4 +97,24 @@ public class SynTask { |
|
|
|
stopWatch.stop(); |
|
|
|
log.info("政务数据 ===================== 同步总共耗时 :{} s",stopWatch.getTotalTimeSeconds()); |
|
|
|
} |
|
|
|
|
|
|
|
public void synMenu() { |
|
|
|
//2. 事项 |
|
|
|
List<NdKqZzsfwMenu> menus = menuService.list(); |
|
|
|
for(NdKqZzsfwMenu menu : menus){ |
|
|
|
String url = matterCacheHelper.getUrl(menu.getItemName()); |
|
|
|
log.info("当前缓存的数据 : {},{}",menu.getItemName(),url); |
|
|
|
if(StringUtils.isBlank(url)){ |
|
|
|
menuService.update(Wrappers.lambdaUpdate(NdKqZzsfwMenu.class) |
|
|
|
.eq(NdKqZzsfwMenu::getId,menu.getId()) |
|
|
|
.set(NdKqZzsfwMenu::getWebapplyurl,null) |
|
|
|
.set(NdKqZzsfwMenu::getHasUrl, CommonEnum.NO.getCode())); |
|
|
|
}else{ |
|
|
|
menuService.update(Wrappers.lambdaUpdate(NdKqZzsfwMenu.class) |
|
|
|
.eq(NdKqZzsfwMenu::getId,menu.getId()) |
|
|
|
.set(NdKqZzsfwMenu::getWebapplyurl,url) |
|
|
|
.set(NdKqZzsfwMenu::getHasUrl,CommonEnum.YES.getCode())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |