From 190db16490f78231fc1e0b6d1093f3a343df9efa Mon Sep 17 00:00:00 2001 From: RuoYi Date: Thu, 8 Aug 2019 16:24:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E8=AE=BE=E7=BD=AE=E4=B8=BB=E9=94=AE?= =?UTF-8?q?=E5=88=97=E9=BB=98=E8=AE=A4=E9=A6=96=E4=B8=AA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E4=B8=BA=E4=B8=BB=E9=94=AE=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/generator/service/impl/GenTableServiceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java index 6bfbc124..f7edca38 100644 --- a/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java +++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/service/impl/GenTableServiceImpl.java @@ -314,6 +314,10 @@ public class GenTableServiceImpl implements IGenTableService break; } } + if (StringUtils.isNull(table.getPkColumn())) + { + table.setPkColumn(columns.get(0)); + } } /**