|
|
@@ -189,22 +189,24 @@ public class StorePlatformRoleController {
|
|
|
return R.fail("删除失败");
|
|
|
}
|
|
|
|
|
|
- @ApiOperation("修改角色状态")
|
|
|
+ @ApiOperation("逻辑删除角色")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "roleId", value = "角色ID", dataType = "Long", paramType = "query", required = true),
|
|
|
- @ApiImplicitParam(name = "status", value = "角色状态(0正常 1停用)", dataType = "String", paramType = "query", required = true)
|
|
|
+ @ApiImplicitParam(name = "roleId", value = "角色ID", dataType = "Long", paramType = "query", required = true)
|
|
|
})
|
|
|
- @PutMapping("/updateStatus")
|
|
|
- public R<String> updateStatus(
|
|
|
- @RequestParam("roleId") Long roleId,
|
|
|
- @RequestParam("status") String status) {
|
|
|
- log.info("StorePlatformRoleController.updateStatus?roleId={}, status={}", roleId, status);
|
|
|
- boolean result = storePlatformRoleService.updateStatus(roleId, status);
|
|
|
- if (result) {
|
|
|
- return R.success("操作成功");
|
|
|
+ @PlatformOperationLog(
|
|
|
+ module = "角色操作记录",
|
|
|
+ type = "删除角色",
|
|
|
+ content = "删除角色ID=#{#roleId}"
|
|
|
+ )
|
|
|
+ @DeleteMapping("/deleteRoleWithCheck")
|
|
|
+ public R<String> deleteRoleWithCheck(@RequestParam("roleId") Long roleId) {
|
|
|
+ log.info("StorePlatformRoleController.deleteRoleWithCheck?roleId={}", roleId);
|
|
|
+ String errorMsg = storePlatformRoleService.deleteRoleWithCheck(roleId);
|
|
|
+ if (errorMsg == null) {
|
|
|
+ return R.success("删除成功");
|
|
|
}
|
|
|
- return R.fail("操作失败");
|
|
|
+ return R.fail(errorMsg);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("查询所有正常状态的角色列表")
|