mirror of
https://github.com/cool-team-official/cool-admin-java.git
synced 2026-10-07 15:28:30 +08:00
修复: json初始化数据问题
This commit is contained in:
@@ -144,7 +144,12 @@ public class DBFromJsonInit implements ApplicationRunner {
|
||||
// 数据库已经有值了
|
||||
continue;
|
||||
}
|
||||
baseMapper.insertSelectiveWithPk(entity);
|
||||
if (ObjUtil.isNotEmpty(id)) {
|
||||
// 带id插入
|
||||
baseMapper.insertSelectiveWithPk(entity);
|
||||
} else {
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user