Commit 1ae0694d authored by chenyan's avatar chenyan

2024/05/09_API文档后台管理开发

parent a7f6e0ab
......@@ -68,18 +68,16 @@ public class ApiCustomParamsBiz extends BaseBiz<ApiCustomParamsMapper, ApiCustom
return ObjectRestResponse.createFailedResult(ResultCode.EXIST_CODE, "API节点下已存在自定义参数");
}
}
if (apiCustomParams.getId() != null) {
Example exampleParams = new Example(ApiCustomParams.class);
exampleParams.createCriteria()
.andEqualTo("docId", apiCustomParams.getDocId())
.andEqualTo("nodeId", apiCustomParams.getNodeId());
ApiCustomParams old = mapper.selectOneByExample(exampleParams);
if (old == null || old.getIsDel() == 1) {
return ObjectRestResponse.createFailedResult(ResultCode.NOTEXIST_CODE, ResultCode.getMsg(ResultCode.NOTEXIST_CODE));
}
Example exampleParams = new Example(ApiCustomParams.class);
exampleParams.createCriteria()
.andEqualTo("docId", apiCustomParams.getDocId())
.andEqualTo("nodeId", apiCustomParams.getNodeId())
.andEqualTo("isDel",0);
ApiCustomParams old = mapper.selectOneByExample(exampleParams);
if (old != null) {
BeanUtil.copyProperties(apiCustomParams, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(old);
} else {
}else {
insertSelectiveRe(apiCustomParams);
}
return ObjectRestResponse.succ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment