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

This commit is contained in:
l90215
2025-07-27 00:33:33 +08:00
parent 915a393427
commit 7e60cb357f
20 changed files with 514 additions and 1090 deletions

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.ruoyi.generator.mapper.GenTableColumnMapper">
</mapper>

View File

@@ -1,59 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.ruoyi.generator.mapper.GenTableMapper">
<!-- 多结构嵌套自动映射需带上每个实体的主键id 否则映射会失败 -->
<resultMap type="org.ruoyi.generator.domain.GenTable" id="GenTableResult">
<id property="tableId" column="table_id"/>
<collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult"/>
</resultMap>
<resultMap type="org.ruoyi.generator.domain.GenTableColumn" id="GenTableColumnResult">
<id property="columnId" column="column_id"/>
</resultMap>
<select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult">
SELECT t.table_id,
t.table_name,
t.table_comment,
t.sub_table_name,
t.sub_table_fk_name,
t.class_name,
t.tpl_category,
t.package_name,
t.module_name,
t.business_name,
t.function_name,
t.function_author,
t.gen_type,
t.gen_path,
t.options,
t.remark,
c.column_id,
c.column_name,
c.column_comment,
c.column_type,
c.java_type,
c.java_field,
c.is_pk,
c.is_increment,
c.is_required,
c.is_insert,
c.is_edit,
c.is_list,
c.is_query,
c.query_type,
c.html_type,
c.dict_type,
c.sort
FROM gen_table t
LEFT JOIN gen_table_column c ON t.table_id = c.table_id
where t.table_id = #{tableId}
order by c.sort
</select>
</mapper>

View File

@@ -1,3 +0,0 @@
java包使用 `.` 分割 resource 目录使用 `/` 分割
<br>
此文件目的 防止文件夹粘连找不到 `xml` 文件