修复: json初始化数据问题

This commit is contained in:
ruying408
2024-08-30 22:41:54 +08:00
parent c9afd4ec18
commit a3601b9d46

View File

@@ -144,7 +144,12 @@ public class DBFromJsonInit implements ApplicationRunner {
// 数据库已经有值了
continue;
}
if (ObjUtil.isNotEmpty(id)) {
// 带id插入
baseMapper.insertSelectiveWithPk(entity);
} else {
baseMapper.insert(entity);
}
}
}