package com.njzscloud.common.gen;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * 代码模板
 */
@Mapper
public interface TplMapper extends BaseMapper<TplEntity> {

    @Select("SELECT TABLE_SCHEMA tableSchema, TABLE_NAME tableName, TABLE_COMMENT tableComment\n" +
        "FROM information_schema.TABLES\n" +
        "${ew.customSqlSegment}")
    IPage<Map<String, Object>> tablePaging(Page<Object> page, @Param("ew") QueryWrapper<Object> ew);
}
