Class IdListProvider

java.lang.Object
org.miaixz.bus.mapper.builder.MapperTemplate
org.miaixz.bus.mapper.additional.idlist.IdListProvider

public class IdListProvider extends MapperTemplate
通过 ids 字符串的各种操作 ids 如 "1,2,3"
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • IdListProvider

      public IdListProvider(Class<?> mapperClass, MapperBuilder mapperBuilder)
  • Method Details

    • notEmpty

      public static void notEmpty(List<?> list, String errorMsg)
      保证 idList 不能为空
      Parameters:
      list - 列表
      errorMsg - 错误信息
    • deleteByIdList

      public String deleteByIdList(org.apache.ibatis.mapping.MappedStatement ms)
      根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段
      Parameters:
      ms - MappedStatement
      Returns:
      the string
    • selectByIdList

      public String selectByIdList(org.apache.ibatis.mapping.MappedStatement ms)
      根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段
      Parameters:
      ms - MappedStatement
      Returns:
      the string