feat: 更新代码生成功能-优化逻辑

This commit is contained in:
l90215
2025-07-27 22:37:26 +08:00
parent 7e60cb357f
commit a48178685c

View File

@@ -256,15 +256,6 @@ public class GenTableServiceImpl implements IGenTableService {
// 添加readConverterExp方法
column.put("readConverterExp", new Object() {
public String readConverterExp() {
// 从字段注释中提取转换表达式
String comment = field.getName();
if (StrUtil.isNotBlank(comment) && comment.contains("") && comment.contains("")) {
String exp = comment.substring(comment.indexOf("") + 1, comment.indexOf(""));
return exp.replace("", ",").replace(" ", "");
}
return "";
}
});
// 根据Java类型添加相应的导入
@@ -357,7 +348,7 @@ public class GenTableServiceImpl implements IGenTableService {
}
String className = toCamelCase(baseClassName, true); // 首字母大写SysRole
String classname = toCamelCase(baseClassName, false); // 首字母小写sysRole
// 首字母小写sysRole
String moduleName = getModuleName(packageName);
String javaPath = "src/main/java/";
String mybatisPath = "src/main/resources/mapper/";