diff --git a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java index 9eed6d0e0..dde17fc6e 100644 --- a/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java +++ b/yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.framework.mybatis.core.mapper; +import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils; @@ -69,10 +70,16 @@ public interface BaseMapperX extends BaseMapper { } default List selectList(String field, Collection values) { + if (CollUtil.isEmpty(values)) { + return CollUtil.newArrayList(); + } return selectList(new QueryWrapper().in(field, values)); } default List selectList(SFunction field, Collection values) { + if (CollUtil.isEmpty(values)) { + return CollUtil.newArrayList(); + } return selectList(new LambdaQueryWrapper().in(field, values)); } @@ -115,4 +122,4 @@ public interface BaseMapperX extends BaseMapper { Db.saveOrUpdateBatch(collection); } -} +} \ No newline at end of file