mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-20 01:07:46 +08:00
代码生成器-获取数据表
This commit is contained in:
@@ -11,13 +11,26 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface GenTableMapper extends IBaseMapper<GenTable> {
|
||||
|
||||
@Select(
|
||||
/**
|
||||
* 查询库中的数据表
|
||||
*
|
||||
* @author fzr
|
||||
* @param params 参数
|
||||
* @return List<Map<String, String>>
|
||||
*/
|
||||
@Select({"<script>",
|
||||
"SELECT table_name, table_comment, create_time, update_time " +
|
||||
"FROM information_schema.tables " +
|
||||
"WHERE table_schema = (SELECT database()) " +
|
||||
"AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%' " +
|
||||
"AND table_name NOT IN (select table_name from ls_gen_table)"
|
||||
)
|
||||
List<Map<String, String>> selectDbTableList();
|
||||
"AND table_name NOT IN (select table_name from ls_gen_table)",
|
||||
"<if test=\"tableName != null and tableName != ''\">" +
|
||||
"AND lower(table_name) like lower(concat('%', #{tableName}, '%'))" +
|
||||
"</if>",
|
||||
"<if test=\"tableComment != null and tableComment != ''\">" +
|
||||
"AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))" +
|
||||
"</if>",
|
||||
"</script>"})
|
||||
List<Map<String, String>> selectDbTableList(Map<String, String> params);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user