Module bus.mapper

Interface ListMapper<T>

Type Parameters:
T - 实体类类型

public interface ListMapper<T>
批量操作接口,提供实体列表的批量插入和更新方法
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    <S extends T>
    int
    insertList(List<S> entityList)
    批量插入实体列表
    <S extends T>
    int
    updateList(List<S> entityList)
    批量更新实体列表
    <S extends T>
    int
    updateListSelective(List<S> entityList)
    批量更新实体列表中非空字段
  • Method Details

    • insertList

      @Lang(Caching.class) @InsertProvider(type=ListProvider.class, method="insertList") <S extends T> int insertList(@Param("entityList") List<S> entityList)
      批量插入实体列表
      Type Parameters:
      S - 实体类型
      Parameters:
      entityList - 实体对象列表
      Returns:
      插入成功的记录数,等于 entityList.size() 表示成功,否则失败
    • updateList

      @Lang(Caching.class) @UpdateProvider(type=ListProvider.class, method="updateList") <S extends T> int updateList(@Param("entityList") List<S> entityList)
      批量更新实体列表
      Type Parameters:
      S - 实体类型
      Parameters:
      entityList - 实体对象列表
      Returns:
      更新成功的记录数
    • updateListSelective

      @Lang(Caching.class) @UpdateProvider(type=ListProvider.class, method="updateListSelective") <S extends T> int updateListSelective(@Param("entityList") List<S> entityList)
      批量更新实体列表中非空字段
      Type Parameters:
      S - 实体类型
      Parameters:
      entityList - 实体对象列表
      Returns:
      更新成功的记录数