package com.platform.modules.sys.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author TONG
 * 2019/11/11 19:09
 **/
@Mapper
public interface SysSchemaDao extends BaseMapper<String> {

    @Select("select TABLE_NAME from information_schema.columns " +
            "where table_schema = (select database()) " +
            "and table_name in (SELECT TABLE_NAME from information_schema.TABLES where table_schema =(select database())) " +
            "and COLUMN_NAME = #{columnName}")
    List<String> queryTables(String columnName);
}
