update 使用 StringUtils.SLASH 替代硬编码的斜杠

This commit is contained in:
AprilWind
2026-03-31 09:12:35 +08:00
parent ec9e98096f
commit 11d392fb73
8 changed files with 11 additions and 10 deletions

View File

@@ -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);

View File

@@ -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