|
@@ -115,7 +115,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
|
|
|
public boolean insertBatch(List<T> entityList) {
|
|
|
if (null == entityList) {
|
|
|
- throw new IllegalArgumentException("entityList must not be empty");
|
|
|
+ throw new IllegalArgumentException("Error: entityList must not be empty");
|
|
|
}
|
|
|
return retBool(baseMapper.insertBatch(entityList));
|
|
|
}
|
|
@@ -138,11 +138,11 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
*/
|
|
|
protected boolean insertBatch(List<T> entityList, int batchSize, boolean isSelective) {
|
|
|
if (null == entityList) {
|
|
|
- throw new IllegalArgumentException("entityList must not be empty");
|
|
|
+ throw new IllegalArgumentException("Error: entityList must not be empty");
|
|
|
}
|
|
|
TableInfo tableInfo = TableInfoHelper.getTableInfo(currentModleClass());
|
|
|
if (null == tableInfo) {
|
|
|
- throw new MybatisPlusException("Error: insertBatch Fail, ClassGenricType not found .");
|
|
|
+ throw new MybatisPlusException("Error: Cannot execute insertBatch Method, ClassGenricType not found .");
|
|
|
}
|
|
|
SqlSession batchSqlSession = tableInfo.getSqlSessionFactory().openSession(ExecutorType.BATCH, false);
|
|
|
try {
|
|
@@ -159,7 +159,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
}
|
|
|
batchSqlSession.flushStatements();
|
|
|
} catch (Exception e) {
|
|
|
- logger.warning("Warn: Method insertBatch Fail. Cause:" + e);
|
|
|
+ logger.warning("Error: Cannot execute insertBatch Method. Cause:" + e);
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
@@ -173,7 +173,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
|
|
|
public boolean insertBatchSelective(List<T> entityList) {
|
|
|
if (null == entityList) {
|
|
|
- throw new IllegalArgumentException("entityList must not be empty");
|
|
|
+ throw new IllegalArgumentException("Error: entityList must not be empty");
|
|
|
}
|
|
|
int result = 0;
|
|
|
for (T t : entityList) {
|
|
@@ -242,7 +242,7 @@ public class ServiceImpl<M extends BaseMapper<T, PK>, T, PK extends Serializable
|
|
|
if (CollectionUtil.isNotEmpty(list)) {
|
|
|
int size = list.size();
|
|
|
if (size > 1) {
|
|
|
- logger.warning("Warn: selectOne Method There are " + size + " results.");
|
|
|
+ logger.warning(String.format("Warn: selectOne Method There are %s results.", size));
|
|
|
}
|
|
|
return list.get(0);
|
|
|
}
|