广州市综治平台后端
xusd
2025-06-07 36306491396230522fa20585c2621a7fc899849a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?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>