mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2026-04-22 11:04:28 +08:00
update 使用 StringUtils.SLASH 替代硬编码的斜杠
This commit is contained in:
@@ -110,7 +110,7 @@ public class SpringDocConfig {
|
||||
public OpenApiCustomizer openApiCustomizer() {
|
||||
String contextPath = serverProperties.getServlet().getContextPath();
|
||||
String finalContextPath;
|
||||
if (StringUtils.isBlank(contextPath) || "/".equals(contextPath)) {
|
||||
if (StringUtils.isBlank(contextPath) || StringUtils.SLASH.equals(contextPath)) {
|
||||
finalContextPath = "";
|
||||
} else {
|
||||
finalContextPath = contextPath;
|
||||
|
||||
@@ -610,7 +610,7 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
*/
|
||||
public static String getGenPath(GenTable table, String template) {
|
||||
String genPath = table.getGenPath();
|
||||
if (StringUtils.equals(genPath, "/")) {
|
||||
if (StringUtils.equals(genPath, StringUtils.SLASH)) {
|
||||
return System.getProperty("user.dir") + File.separator + "src" + File.separator + TemplateEngineUtils.getFileName(template, table);
|
||||
}
|
||||
return genPath + File.separator + TemplateEngineUtils.getFileName(template, table);
|
||||
|
||||
@@ -202,8 +202,8 @@ public class TemplateEngineUtils {
|
||||
// 业务名称
|
||||
String businessName = genTable.getBusinessName();
|
||||
|
||||
String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/");
|
||||
String mybatisPath = MYBATIS_PATH + "/" + moduleName;
|
||||
String javaPath = PROJECT_PATH + StringUtils.SLASH + StringUtils.replace(packageName, ".", StringUtils.SLASH);
|
||||
String mybatisPath = MYBATIS_PATH + StringUtils.SLASH + moduleName;
|
||||
String vuePath = "vue";
|
||||
// templatePath
|
||||
// genFilePathFormat
|
||||
|
||||
@@ -136,11 +136,11 @@ public class SysMenu extends BaseEntity {
|
||||
// 非外链并且是一级目录(类型为目录)
|
||||
if (Constants.TOP_PARENT_ID.equals(getParentId()) && SystemConstants.TYPE_DIR.equals(getMenuType())
|
||||
&& SystemConstants.NO.equals(getIsFrame())) {
|
||||
routerPath = "/" + this.path;
|
||||
routerPath = StringUtils.SLASH + this.path;
|
||||
}
|
||||
// 非外链并且是一级目录(类型为菜单)
|
||||
else if (isMenuFrame()) {
|
||||
routerPath = "/";
|
||||
routerPath = StringUtils.SLASH;
|
||||
}
|
||||
return routerPath;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class MetaVo {
|
||||
if (StringUtils.ishttp(link)) {
|
||||
this.link = link;
|
||||
}
|
||||
if (StringUtils.startWithAnyIgnoreCase(activeMenu, "/")) {
|
||||
if (StringUtils.startWithAnyIgnoreCase(activeMenu, StringUtils.SLASH)) {
|
||||
this.activeMenu = activeMenu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class DeptExcelConverter implements Converter<Long> {
|
||||
|
||||
Map<String, Tree<Long>> deptPathToTreeMap = TreeBuildUtils.buildTreeNodeMap(
|
||||
SpringUtils.getBean(ISysDeptService.class).selectDeptTreeList(new SysDeptBo()),
|
||||
"/",
|
||||
StringUtils.SLASH,
|
||||
Tree::getName
|
||||
);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.dromara.system.listener;
|
||||
|
||||
import cn.hutool.core.lang.tree.Tree;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.core.utils.TreeBuildUtils;
|
||||
import org.dromara.common.excel.core.ExcelOptionsProvider;
|
||||
import org.dromara.system.domain.bo.SysDeptBo;
|
||||
@@ -31,7 +32,7 @@ public class DeptExcelOptions implements ExcelOptionsProvider {
|
||||
@Override
|
||||
public Set<String> getOptions() {
|
||||
List<Tree<Long>> trees = deptService.selectDeptTreeList(new SysDeptBo());
|
||||
Map<String, Tree<Long>> treeMap = TreeBuildUtils.buildTreeNodeMap(trees, "/", Tree::getName);
|
||||
Map<String, Tree<Long>> treeMap = TreeBuildUtils.buildTreeNodeMap(trees, StringUtils.SLASH, Tree::getName);
|
||||
return treeMap.keySet();
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
||||
router.setChildren(childrenList);
|
||||
} else if (menu.getParentId().equals(Constants.TOP_PARENT_ID) && menu.isInnerLink()) {
|
||||
router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon()));
|
||||
router.setPath("/");
|
||||
router.setPath(StringUtils.SLASH);
|
||||
List<RouterVo> childrenList = new ArrayList<>();
|
||||
RouterVo children = new RouterVo();
|
||||
String routerPath = SysMenu.innerLinkReplaceEach(menu.getPath());
|
||||
|
||||
Reference in New Issue
Block a user