接口 ExampleMapper<T>

所有已知子接口:
AbstrMapper<T>

public interface ExampleMapper<T>
  • 方法详细资料

    • 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

      default T selectOneByExample(@Param("example") Example example)
      根据 Example 条件单条查询
      参数:
      example - 条件
      返回:
      实体列表
    • selectOneMapByExample

      default Map<String,Object> selectOneMapByExample(@Param("example") Example example)
      根据 Example 条件单条查询
      参数:
      example - 条件
      返回:
      实体列表