Commit 41b405ee sunke

海拉接口配置问题

1 个父辈 3cfc2df1
...@@ -323,10 +323,9 @@ public class DataInitManager { ...@@ -323,10 +323,9 @@ public class DataInitManager {
*/ */
private Set<String> hideMenu(Map<String, Menu> allMenu, String[] menuListToHide){ private Set<String> hideMenu(Map<String, Menu> allMenu, String[] menuListToHide){
Set<String> hideIdSet = new HashSet<>(); Set<String> hideIdSet = new HashSet<>();
for (String showPath : menuListToHide) { for (String hidePath : menuListToHide) {
Menu hideMenu = allMenu.get(showPath); Menu hideMenu = menuManager.findByPath(hidePath);
if(hideMenu != null){ if(hideMenu != null){
hideMenu = menuManager.findByPath(hideMenu.getPath());
if(hideMenu != null){ if(hideMenu != null){
hideMenu.setHidden(true); hideMenu.setHidden(true);
menuManager.saveMenu(hideMenu); menuManager.saveMenu(hideMenu);
...@@ -334,8 +333,9 @@ public class DataInitManager { ...@@ -334,8 +333,9 @@ public class DataInitManager {
addToMenuIdSet(hideIdSet,hideMenu); addToMenuIdSet(hideIdSet,hideMenu);
} }
}else{ }else{
log.error("菜单:" + showPath + "不存在"); log.error("菜单:" + hidePath + "不存在");
} }
} }
return hideIdSet; return hideIdSet;
} }
......
...@@ -59,10 +59,11 @@ public class HellaTcpClient { ...@@ -59,10 +59,11 @@ public class HellaTcpClient {
@PostConstruct @PostConstruct
public void init(){ public void init(){
host=dataCache.getConfigCache("hella.host",host); host=dataCache.getConfigCache("hella.host",host);
port=Integer.parseInt(dataCache.getConfigCache("hella.port",configPort)) ; String portStr = dataCache.getConfigCache("hella.port",configPort);
if(ObjectUtil.isEmpty(host)||ObjectUtil.isEmpty(port)){ if(ObjectUtil.isEmpty(host) || ObjectUtil.isEmpty(portStr)){
log.info("配置不完整,不需要连接"); log.info("配置不完整,不需要连接");
}else{ }else{
port=Integer.parseInt(portStr) ;
String apiName = dataCache.getConfigCache("api.name",""); String apiName = dataCache.getConfigCache("api.name","");
if(apiName != null && apiName.equalsIgnoreCase("Hella")){ if(apiName != null && apiName.equalsIgnoreCase("Hella")){
updateServerInfo(host, port); updateServerInfo(host, port);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!