|
|
@ -100,12 +100,12 @@ public class MenuServiceImpl implements MenuService { |
|
|
|
if(resources.getPid().equals(0L)){ |
|
|
|
resources.setPid(null); |
|
|
|
} |
|
|
|
if(resources.getIFrame()){ |
|
|
|
String http = "http://", https = "https://"; |
|
|
|
if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { |
|
|
|
throw new BaseException("外链必须以http://或者https://开头"); |
|
|
|
} |
|
|
|
} |
|
|
|
// if(resources.getIFrame()){ |
|
|
|
// String http = "http://", https = "https://"; |
|
|
|
// if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { |
|
|
|
// throw new BaseException("外链必须以http://或者https://开头"); |
|
|
|
// } |
|
|
|
// } |
|
|
|
menuRepository.save(resources); |
|
|
|
// 计算子节点数目 |
|
|
|
resources.setSubCount(0); |
|
|
|