|
@@ -114,7 +114,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
}
|
|
|
|
|
|
public boolean insertBatch(List<T> entityList) {
|
|
|
- if (null == entityList) {
|
|
|
+ if (CollectionUtil.isEmpty(entityList)) {
|
|
|
throw new IllegalArgumentException("Error: entityList must not be empty");
|
|
|
}
|
|
|
return retBool(baseMapper.insertBatch(entityList));
|
|
@@ -137,7 +137,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
* @return
|
|
|
*/
|
|
|
protected boolean insertBatch(List<T> entityList, int batchSize, boolean isSelective) {
|
|
|
- if (null == entityList) {
|
|
|
+ if (CollectionUtil.isEmpty(entityList)) {
|
|
|
throw new IllegalArgumentException("Error: entityList must not be empty");
|
|
|
}
|
|
|
TableInfo tableInfo = TableInfoHelper.getTableInfo(currentModleClass());
|
|
@@ -172,7 +172,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
}
|
|
|
|
|
|
public boolean insertBatchSelective(List<T> entityList) {
|
|
|
- if (null == entityList) {
|
|
|
+ if (CollectionUtil.isEmpty(entityList)) {
|
|
|
throw new IllegalArgumentException("Error: entityList must not be empty");
|
|
|
}
|
|
|
int result = 0;
|