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());