zhaowenxuan
2024-10-14 7d702f59202496e28a80582b4aeeab2a9b9da76d
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
33
34
35
36
37
38
package com.ltkj.web.config.wordUtil.mapper;
 
 
import com.ltkj.hosp.domain.TableFileds;
import com.ltkj.hosp.domain.Tables;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
/**
 * <p> 查询表数据信息 </p>
 *
 * @author : 赵佳豪
 */
@Mapper
public interface TableMapper {
 
    /**
     * 获取指定数据库下所有表名和注释
     *
     * @param dbName:数据库名
     * @return: java.util.List<Tables>
     */
    @Select("select table_name as name,table_comment as comment from information_schema.tables where table_schema =#{dbName} order by table_name")
    List<Tables> getAllTables(@Param("dbName") String dbName);
 
    /**
     * 获取指定表信息
     *
     * @param tableName:表
     * @return: java.util.List<TableFileds>
     */
    @Select("SHOW FULL FIELDS FROM ${tableName}")
    List<TableFileds> getTable(@Param("tableName") String tableName);
 
}