瀏覽代碼

更新文档注释.

nieqiurong 1 年之前
父節點
當前提交
c57cf7862d

+ 1 - 0
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/MybatisMapperBuilderAssistant.java

@@ -47,6 +47,7 @@ public class MybatisMapperBuilderAssistant extends MapperBuilderAssistant {
         super(configuration, resource);
     }
 
+    @Override
     public ResultMapping buildResultMapping(Class<?> resultType, String property, String column, Class<?> javaType,
                                             JdbcType jdbcType, String nestedSelect, String nestedResultMap, String notNullColumn, String columnPrefix,
                                             Class<? extends TypeHandler<?>> typeHandler, List<ResultFlag> flags, String resultSet, String foreignColumn,

+ 2 - 1
mybatis-plus-core/src/main/java/com/baomidou/mybatisplus/core/mapper/BaseMapper.java

@@ -143,13 +143,14 @@ public interface BaseMapper<T> extends Mapper<T> {
     /**
      * 根据 whereEntity 条件,更新记录
      *
-     * @param entity        实体对象 (set 条件值,可以为 null)
+     * @param entity        实体对象 (set 条件值,可以为 null,当entity为null时,无法进行自动填充)
      * @param updateWrapper 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)
      */
     int update(@Param(Constants.ENTITY) T entity, @Param(Constants.WRAPPER) Wrapper<T> updateWrapper);
 
     /**
      * 根据 Wrapper 更新记录
+     * <p>此方法无法进行自动填充,如需自动填充请使用{@link #update(Object, Wrapper)}</p>
      *
      * @param updateWrapper {@link UpdateWrapper} or {@link LambdaUpdateWrapper}
      * @since 3.5.4

+ 2 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/conditions/update/ChainUpdate.java

@@ -28,6 +28,7 @@ public interface ChainUpdate<T> extends ChainWrapper<T> {
 
     /**
      * 更新数据
+     * <p>此方法无法进行自动填充,如需自动填充请使用{@link #update(Object)}</p>
      *
      * @return 是否成功
      */
@@ -38,7 +39,7 @@ public interface ChainUpdate<T> extends ChainWrapper<T> {
     /**
      * 更新数据
      *
-     * @param entity 实体类
+     * @param entity 实体类(当entity为空时无法进行自动填充)
      * @return 是否成功
      */
     default boolean update(T entity) {

+ 2 - 1
mybatis-plus-extension/src/main/java/com/baomidou/mybatisplus/extension/service/IService.java

@@ -238,6 +238,7 @@ public interface IService<T> {
 
     /**
      * 根据 UpdateWrapper 条件,更新记录 需要设置sqlset
+     * <p>此方法无法进行自动填充,如需自动填充请使用{@link #update(Object, Wrapper)}</p>
      *
      * @param updateWrapper 实体对象封装操作类 {@link com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper}
      */
@@ -248,7 +249,7 @@ public interface IService<T> {
     /**
      * 根据 whereEntity 条件,更新记录
      *
-     * @param entity        实体对象
+     * @param entity        实体对象(当entity为空时无法进行自动填充)
      * @param updateWrapper 实体对象封装操作类 {@link com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper}
      */
     default boolean update(T entity, Wrapper<T> updateWrapper) {