Class IdListProvider

java.lang.Object
cn.lm.mybatis.mapper.mapperhelper.MapperTemplate
cn.lm.mybatis.mapper.additional.idlist.IdListProvider

public class IdListProvider extends MapperTemplate
通过 ids 字符串的各种操作

ids 如 "1,2,3"

Author:
liuzh
  • Constructor Details

    • IdListProvider

      public IdListProvider(Class<?> mapperClass, MapperHelper mapperHelper)
  • 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 -
      Returns:
    • selectByIdList

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