Package cn.yusiwen.commons.mapper
Class BaseMapper.SelectByPrimaryKeyInSqlProvider
java.lang.Object
cn.yusiwen.commons.mapper.BaseMapper.BaseSqlProviderSupport
cn.yusiwen.commons.mapper.BaseMapper.SelectByPrimaryKeyInSqlProvider
- Enclosing interface:
BaseMapper<S extends BaseEntity>
public static class BaseMapper.SelectByPrimaryKeyInSqlProvider
extends BaseMapper.BaseSqlProviderSupport
根据id列表查询
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class cn.yusiwen.commons.mapper.BaseMapper.BaseSqlProviderSupport
tableInfo
-
Constructor Details
-
SelectByPrimaryKeyInSqlProvider
public SelectByPrimaryKeyInSqlProvider()创建一个新的SelectByPrimaryKeyInSqlProvider实例。此构造函数用于初始化批量主键查询的SQL提供者。 主要用于生成根据ID列表进行批量查询的SQL语句。
-
-
Method Details
-
sql
public String sql(Map<String, Object> params, org.apache.ibatis.builder.annotation.ProviderContext context) 生成根据主键ID列表进行批量查询的SQL语句该方法用于构建一个SELECT语句,可以同时查询多个指定ID的记录。 它将生成类似"SELECT ... FROM table WHERE id IN (1,2,3)"的SQL语句。
- Parameters:
params- 包含查询参数的Map,其中"ids"键对应要查询的ID列表context- MyBatis提供的上下文对象,包含Mapper接口的相关信息- Returns:
- 生成的SELECT SQL语句
-