Commit 7d99c6dbe874502ab5d99c63646d6a9e501ac663

Authored by YunaiV
2 parents acee7345 544e650e

Merge branch 'master' of https://github.com/YunaiV/ruoyi-vue-pro

yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/core/mapper/BaseMapperX.java
1 1 package cn.iocoder.yudao.framework.mybatis.core.mapper;
2 2  
  3 +import cn.hutool.core.collection.CollUtil;
3 4 import cn.iocoder.yudao.framework.common.pojo.PageParam;
4 5 import cn.iocoder.yudao.framework.common.pojo.PageResult;
5 6 import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
... ... @@ -75,10 +76,16 @@ public interface BaseMapperX<T> extends BaseMapper<T> {
75 76 }
76 77  
77 78 default List<T> selectList(String field, Collection<?> values) {
  79 + if (CollUtil.isEmpty(values)) {
  80 + return CollUtil.newArrayList();
  81 + }
78 82 return selectList(new QueryWrapper<T>().in(field, values));
79 83 }
80 84  
81 85 default List<T> selectList(SFunction<T, ?> field, Collection<?> values) {
  86 + if (CollUtil.isEmpty(values)) {
  87 + return CollUtil.newArrayList();
  88 + }
82 89 return selectList(new LambdaQueryWrapper<T>().in(field, values));
83 90 }
84 91  
... ... @@ -121,4 +128,4 @@ public interface BaseMapperX&lt;T&gt; extends BaseMapper&lt;T&gt; {
121 128 Db.saveOrUpdateBatch(collection);
122 129 }
123 130  
124 131 -}
  132 +}
125 133 \ No newline at end of file
... ...