From ae43edeb4fe322916ddbcc9e37ecbbb3d9847518 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期三, 23 六月 2021 21:24:13 +0800
Subject: [PATCH] update 更新 初始化项目 文档地址

---
 ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/methods/InsertAll.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/methods/InsertAll.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/methods/InsertAll.java
index 939849e..9c8c0f7 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/methods/InsertAll.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/mybatisplus/methods/InsertAll.java
@@ -40,7 +40,9 @@
 	private String prepareValuesSqlForMysqlBatch(TableInfo tableInfo) {
 		final StringBuilder valueSql = new StringBuilder();
 		valueSql.append("<foreach collection=\"list\" item=\"item\" index=\"index\" open=\"(\" separator=\"),(\" close=\")\">");
-		valueSql.append("#{item.").append(tableInfo.getKeyProperty()).append("},");
+		if (StrUtil.isNotBlank(tableInfo.getKeyColumn())) {
+			valueSql.append("#{item.").append(tableInfo.getKeyProperty()).append("},");
+		}
 		tableInfo.getFieldList().forEach(x -> valueSql.append("#{item.").append(x.getProperty()).append("},"));
 		valueSql.delete(valueSql.length() - 1, valueSql.length());
 		valueSql.append("</foreach>");

--
Gitblit v1.9.3