<?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" ><mappernamespace="com.ly.boilingwater.modules.gen.dao.SysTableDao"><sqlid="selectSql">
SELECT a.table_name as table_name,
a.table_comment as table_comment,
b.COLUMN_NAME as COLUMN_NAME,
b.column_comment as column_comment,
b.column_type as column_type,
b.column_key as column_key
FROM information_schema.TABLES a
LEFT JOIN information_schema.COLUMNS b ON a.table_name = b.TABLE_NAME
WHERE a.table_schema = 'boiling_water'
<iftest="tableName != null and tableName.trim() != ''">
and a.table_name = #{tableName}
</if>
ORDER BY a.table_name;
</sql><selectid="queryALl"resultMap="tableResult"><includerefid="selectSql"></include></select><resultMapid="tableResult"type="com.ly.boilingwater.modules.gen.entity.SysTableEntity"><resultproperty="tableName"column="table_name"/><resultproperty="tableComment"column="table_comment"/><collectionproperty="sysColumnEntityList"ofType="com.ly.boilingwater.modules.gen.entity.SysColumnEntity"><resultproperty="columnName"column="COLUMN_NAME"/><resultproperty="columnComment"column="column_comment"/><resultproperty="columnType"column="column_type"/><resultproperty="columnKey"column="column_key"/></collection></resultMap></mapper>