fix: 标准通用新增支持自传ID
This commit is contained in:
+4
-1
@@ -729,7 +729,10 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
// 对默认的字段赋值
|
// 对默认的字段赋值
|
||||||
String existId = parameterMap.get(FieldCommon.ID) == null ? "" : parameterMap.get(FieldCommon.ID).toString();
|
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 updateWrapper = new UpdateWrapper();
|
||||||
updateWrapper.eq("id", id);
|
updateWrapper.eq("id", id);
|
||||||
|
|||||||
Reference in New Issue
Block a user