Browse Source

优化数据模型新增逻辑

test
smallchill 2 years ago
parent
commit
2291042b1c
  1. 7
      blade-ops/blade-develop/src/main/java/org/springblade/develop/controller/ModelController.java

7
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) @ApiOperationSupport(order = 5)
@ApiOperation(value = "新增或修改", notes = "传入model") @ApiOperation(value = "新增或修改", notes = "传入model")
public R submit(@Valid @RequestBody Model 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);
}
} }
/** /**

Loading…
Cancel
Save