
com.github.freegeese.easymybatis.mapper.SelectMapper Maven / Gradle / Ivy
The newest version!
package com.github.freegeese.easymybatis.mapper;
import com.github.freegeese.easymybatis.annotation.AutoResultMap;
import com.github.freegeese.easymybatis.mapper.provider.SelectSqlProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import java.util.List;
import java.util.Map;
/**
* 通用基础查询 Mapper
*
* @param 实体类型
* @author zhangguangyong
* @since 1.0
*/
public interface SelectMapper {
@SelectProvider(type = SelectSqlProvider.class, method = "selectOne")
T selectOne(Object id);
@SelectProvider(type = SelectSqlProvider.class, method = "selectByEntity")
@AutoResultMap
List selectByEntity(T record);
@SelectProvider(type = SelectSqlProvider.class, method = "selectByParameterMap")
@AutoResultMap
List selectByParameterMap(@Param("parameterMap") Map parameterMap, @Param("entityClass") Class entityClass);
@SelectProvider(type = SelectSqlProvider.class, method = "selectByPrimaryKey")
@AutoResultMap
T selectByPrimaryKey(@Param("id") Object id, @Param("entityClass") Class entityClass);
@SelectProvider(type = SelectSqlProvider.class, method = "selectByPrimaryKeys")
@AutoResultMap
List selectByPrimaryKeys(@Param("ids") List> id, @Param("entityClass") Class entityClass);
@SelectProvider(type = SelectSqlProvider.class, method = "selectAll")
@AutoResultMap
List selectAll(Class entityClass);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy