From 2291042b1cdfc01e671476420bf0f11ce8578883 Mon Sep 17 00:00:00 2001 From: smallchill Date: Mon, 6 Mar 2023 00:38:05 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E6=96=B0=E5=A2=9E=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springblade/develop/controller/ModelController.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/ModelController.java b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/ModelController.java index f5f3e2cb..2dcbf729 100644 --- a/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/ModelController.java +++ b/blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/ModelController.java @@ -112,7 +112,12 @@ public class ModelController extends BladeController { @ApiOperationSupport(order = 5) @ApiOperation(value = "新增或修改", notes = "传入model") public R submit(@Valid @RequestBody Model model) { - return R.status(modelService.saveOrUpdate(model)); + boolean temp = modelService.saveOrUpdate(model); + if (temp) { + return R.data(model); + } else { + return R.status(Boolean.FALSE); + } } /**