类 IdListProvider


  • public class IdListProvider
    extends tk.mybatis.mapper.mapperhelper.MapperTemplate
    通过 ids 字符串的各种操作

    ids 如 "1,2,3"

    作者:
    liuzh
    • 字段概要

      • 从类继承的字段 tk.mybatis.mapper.mapperhelper.MapperTemplate

        entityClassMap, mapperClass, mapperHelper, methodMap
    • 构造器概要

      构造器 
      构造器 说明
      IdListProvider​(Class<?> mapperClass, tk.mybatis.mapper.mapperhelper.MapperHelper mapperHelper)  
    • 方法概要

      所有方法 静态方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      String deleteByIdList​(org.apache.ibatis.mapping.MappedStatement ms)
      根据主键字符串进行删除,类中只有存在一个带有@Id注解的字段
      static void notEmpty​(List<?> list, String errorMsg)
      保证 idList 不能为空
      String selectByIdList​(org.apache.ibatis.mapping.MappedStatement ms)
      根据主键字符串进行查询,类中只有存在一个带有@Id注解的字段
      • 从类继承的方法 tk.mybatis.mapper.mapperhelper.MapperTemplate

        addMethodMap, createSqlSource, dynamicSQL, getConfig, getEntityClass, getIDENTITY, getIDENTITY, isBEFORE, isCheckExampleEntityClass, isNotEmpty, setResultType, setSqlSource, setSqlSource, supportMethod, tableName
    • 构造器详细资料

      • IdListProvider

        public IdListProvider​(Class<?> mapperClass,
                              tk.mybatis.mapper.mapperhelper.MapperHelper mapperHelper)
    • 方法详细资料

      • notEmpty

        public static void notEmpty​(List<?> list,
                                    String errorMsg)
        保证 idList 不能为空
        参数:
        list -
        errorMsg -
      • deleteByIdList

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

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