This commit is contained in:
2023-07-04 17:53:04 +08:00
parent 065b60f851
commit 8be13f00a4
24 changed files with 417 additions and 135 deletions

View File

@ -13,10 +13,16 @@
<result property="sort" column="sort"/>
</resultMap>
<select id="selectListByTableName" resultMap="DbTableColumnVoResult">
<select id="selectDbColumnList" resultMap="DbTableColumnVoResult">
select column_name, (case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else null end) as is_required, (case when column_key = 'PRI' then '1' else '0' end) as is_pk, ordinal_position as sort, column_comment, column_type
from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName})
order by ordinal_position
</select>
<delete id="deleteByTableIds">
delete from generator_table_column where table_id in
<foreach collection="list" item="tableId" open="(" separator="," close=")">
#{tableId}
</foreach>
</delete>
</mapper>