fix: 标准通用新增支持自传ID

This commit is contained in:
2024-04-19 10:01:57 +08:00
parent 986fbaf438
commit 16ce651275
@@ -729,7 +729,10 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
// 对默认的字段赋值
String existId = parameterMap.get(FieldCommon.ID) == null ? "" : parameterMap.get(FieldCommon.ID).toString();
//先新增后面在编辑
String id = executeInsertByModel(module);
String id = "";
if (StrUtil.isBlank(existId)) {
id = executeInsertByModel(module);
}
// 更新语句
UpdateWrapper updateWrapper = new UpdateWrapper();
updateWrapper.eq("id", id);