资源录入区分前端与管理后台录入
This commit is contained in:
parent
cd0aca28c8
commit
60685c8878
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue