接口 ExampleMapper<T>
- 所有已知子接口:
AbstrMapper<T>
public interface ExampleMapper<T>
-
方法概要
修饰符和类型方法说明intdeleteByExample(Example example) 根据 Example 删除selectByExample(Example example) 根据 Example 条件批量查询longselectCountByExample(Example example) 根据 Example 条件批量查询selectMapByExample(Example example) 根据 Example 条件批量查询default TselectOneByExample(Example example) 根据 Example 条件单条查询selectOneMapByExample(Example example) 根据 Example 条件单条查询intupdateByExample(T entity, Example example) 根据 Example 条件批量更新实体信息intupdateByExampleSelective(T entity, Example example) 根据 Example 条件批量更新实体不为空的字段
-
方法详细资料
-
deleteByExample
@Lang(io.mybatis.provider.Caching.class) @DeleteProvider(type=ExampleProvider.class, method="deleteByExample") int deleteByExample(@Param("example") Example example) 根据 Example 删除- 参数:
example- 条件- 返回:
- 大于等于1成功,0失败
-
updateByExample
@Lang(io.mybatis.provider.Caching.class) @UpdateProvider(type=ExampleProvider.class, method="updateByExample") int updateByExample(@Param("entity") T entity, @Param("example") Example example) 根据 Example 条件批量更新实体信息- 参数:
entity- 实体类example- 条件- 返回:
- 大于等于1成功,0失败
-
updateByExampleSelective
@Lang(io.mybatis.provider.Caching.class) @UpdateProvider(type=ExampleProvider.class, method="updateByExampleSelective") int updateByExampleSelective(@Param("entity") T entity, @Param("example") Example example) 根据 Example 条件批量更新实体不为空的字段- 参数:
entity- 实体类example- 条件- 返回:
- 大于等于1成功,0失败
-
selectByExample
@Lang(io.mybatis.provider.Caching.class) @SelectProvider(type=ExampleProvider.class, method="selectByExample") List<T> selectByExample(@Param("example") Example example) 根据 Example 条件批量查询- 参数:
example- 条件- 返回:
- 实体列表
-
selectMapByExample
@Lang(io.mybatis.provider.Caching.class) @ResultType(java.util.Map.class) @SelectProvider(type=ExampleProvider.class, method="selectByExample") List<Map<String,Object>> selectMapByExample(@Param("example") Example example) 根据 Example 条件批量查询- 参数:
example- 条件- 返回:
- 实体列表
-
selectCountByExample
@Lang(io.mybatis.provider.Caching.class) @SelectProvider(type=ExampleProvider.class, method="selectCountByExample") long selectCountByExample(@Param("example") Example example) 根据 Example 条件批量查询- 参数:
example- 条件- 返回:
- 实体列表
-
selectOneByExample
根据 Example 条件单条查询- 参数:
example- 条件- 返回:
- 实体列表
-
selectOneMapByExample
根据 Example 条件单条查询- 参数:
example- 条件- 返回:
- 实体列表
-