|
|
@ -81,44 +81,6 @@ public class SysPermitController { |
|
|
|
return R.ok(sysPermit); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 保存 |
|
|
|
* @param param |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@SysLog(title = "授权新增",biz = BizType.GRANT) |
|
|
|
//@PostMapping("/save")
|
|
|
|
@PreAuthorize("hasRole('sys:permit:insert')") |
|
|
|
public R<?> save(@RequestBody @Valid SysPermit param){ |
|
|
|
boolean result = sysPermitService.save(param); |
|
|
|
return R.isTrue(result); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据ID更新 |
|
|
|
* @param param |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@SysLog(title = "授权修改",biz = BizType.GRANT) |
|
|
|
//@PostMapping("/updateById")
|
|
|
|
@PreAuthorize("hasRole('sys:permit:update')") |
|
|
|
public R<?> updateById(@RequestBody @Valid SysPermit param){ |
|
|
|
boolean result = sysPermitService.updateById(param); |
|
|
|
return R.isTrue(result); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除 |
|
|
|
* @param id |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@SysLog(title = "授权删除",biz = BizType.GRANT) |
|
|
|
//@PostMapping("/deleteById/{id}")
|
|
|
|
@PreAuthorize("hasRole('sys:permit:delete')") |
|
|
|
public R<?> deleteById(@PathVariable("id") String id){ |
|
|
|
boolean result = sysPermitService.removeById(id); |
|
|
|
return R.isTrue(result); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|