<?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">
|
|
<!--@title: 代码生成器mybatis接口
|
@description: 代码生成器mybatis接口
|
@company: hugeinfo
|
@author: liyj
|
@time: 2021-11-05 16:51:48
|
@version: 1.0.0-->
|
<mapper namespace="cn.huge.module.buildcode.dao.mapper.BuildCodeMapper">
|
|
<resultMap id="reslutMap" type="cn.huge.module.buildcode.domain.bo.UserTabColsBO">
|
<result property="tableName" column="tableName"/>
|
<result property="tableComments" column="tableComments"/>
|
<result property="name" column="name"/>
|
<result property="comments" column="comments"/>
|
<result property="dataType" column="dataType"/>
|
</resultMap>
|
<!--自定义查询-mysql-->
|
<select id="getTabInfo" parameterType="String" resultMap="reslutMap">
|
select t2.table_name as 'tableName',
|
t2.table_comment as 'tableComments',
|
t1.column_name as 'name',
|
t1.data_type as 'dataType',
|
t1.column_comment as 'comments'
|
from information_schema.`columns` t1 left join information_schema.`tables` t2
|
on t1.table_name = t2.table_name and t1.table_schema = t2.table_schema
|
where t1.table_schema = #{tableSchema}
|
and t1.table_name = #{tableName}
|
</select>
|
|
</mapper>
|