Class MybatisParameterHandler

java.lang.Object
org.apache.ibatis.scripting.defaults.DefaultParameterHandler
com.baomidou.mybatisplus.core.MybatisParameterHandler
All Implemented Interfaces:
org.apache.ibatis.executor.parameter.ParameterHandler

public class MybatisParameterHandler extends org.apache.ibatis.scripting.defaults.DefaultParameterHandler
自定义 ParameterHandler 重装构造函数,填充插入方法主键 ID
Since:
3.4.0
Author:
nieqiuqiu 2020/6/5
  • Field Details

    • COLLECTION_KEYS

      @Deprecated public static final String[] COLLECTION_KEYS
      Deprecated.
      3.5.4
      填充的key值
      Since:
      3.5.3.2
  • Constructor Details

    • MybatisParameterHandler

      public MybatisParameterHandler(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameter, org.apache.ibatis.mapping.BoundSql boundSql)
  • Method Details

    • processParameter

      public void processParameter(Object parameter)
    • fillLogicDeleteValue

      protected void fillLogicDeleteValue(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo)
    • populateKeys

      protected void populateKeys(TableInfo tableInfo, org.apache.ibatis.reflection.MetaObject metaObject, Object entity)
    • insertFill

      protected void insertFill(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo)
    • updateFill

      protected void updateFill(org.apache.ibatis.reflection.MetaObject metaObject, TableInfo tableInfo)
    • getParameters

      @Deprecated protected Collection<Object> getParameters(Object parameterObject)
      Deprecated.
      3.5.3.2
      处理正常批量插入逻辑

      org.apache.ibatis.session.defaults.DefaultSqlSession$StrictMap 该类方法 wrapCollection 实现 StrictMap 封装逻辑

      Returns:
      集合参数
    • toCollection

      protected Collection<Object> toCollection(Object value)