From 60685c8878a8586b2e4d75c4c3c0610a36969c0b Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 25 Apr 2022 12:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=BD=95=E5=85=A5=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E5=89=8D=E7=AB=AF=E4=B8=8E=E7=AE=A1=E7=90=86=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E5=BD=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/resource/controller/ResourceController.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 41012581..8be3252b 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -121,11 +121,16 @@ public class ResourceController { @PostMapping("/insert") @ApiOperation("保存") @LogOperation("保存") + @ApiImplicitParams({ + @ApiImplicitParam(name = "source", value = "请求来源", paramType = "string", dataType = "string") + }) //@RequiresPermissions("resource:resource:save") - public Result save(@RequestBody ResourceDTO dto) { + public Result save(@RequestBody ResourceDTO dto, String source) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - + if ("f".equals(source)) { + dto.setDelFlag(2); // 来自前端页面 + } resourceService.insertWithAttrs(dto); return new Result().ok(dto.getId() == null ? "" : dto.getId());