|
|
|
|
@ -6,6 +6,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.dromara.common.core.domain.R;
|
|
|
|
|
import org.dromara.common.excel.utils.ExcelUtil;
|
|
|
|
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
|
|
|
|
import org.dromara.common.log.annotation.Log;
|
|
|
|
|
import org.dromara.common.log.enums.BusinessType;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
|
|
@ -77,6 +78,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:add")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PostMapping
|
|
|
|
|
public R<Void> add(@Validated @RequestBody SysRoleBo role) {
|
|
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
|
|
@ -94,6 +96,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:edit")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PutMapping
|
|
|
|
|
public R<Void> edit(@Validated @RequestBody SysRoleBo role) {
|
|
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
|
|
@ -116,6 +119,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:edit")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PutMapping("/dataScope")
|
|
|
|
|
public R<Void> dataScope(@RequestBody SysRoleBo role) {
|
|
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
|
|
@ -128,6 +132,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:edit")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PutMapping("/changeStatus")
|
|
|
|
|
public R<Void> changeStatus(@RequestBody SysRoleBo role) {
|
|
|
|
|
roleService.checkRoleAllowed(role);
|
|
|
|
|
@ -181,6 +186,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:edit")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PutMapping("/authUser/cancel")
|
|
|
|
|
public R<Void> cancelAuthUser(@RequestBody SysUserRole userRole) {
|
|
|
|
|
return toAjax(roleService.deleteAuthUser(userRole));
|
|
|
|
|
@ -194,6 +200,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:edit")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PutMapping("/authUser/cancelAll")
|
|
|
|
|
public R<Void> cancelAuthUserAll(Long roleId, Long[] userIds) {
|
|
|
|
|
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
|
|
|
|
|
@ -207,6 +214,7 @@ public class SysRoleController extends BaseController {
|
|
|
|
|
*/
|
|
|
|
|
@SaCheckPermission("system:role:edit")
|
|
|
|
|
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
|
|
|
|
@RepeatSubmit()
|
|
|
|
|
@PutMapping("/authUser/selectAll")
|
|
|
|
|
public R<Void> selectAuthUserAll(Long roleId, Long[] userIds) {
|
|
|
|
|
roleService.checkRoleDataScope(roleId);
|
|
|
|
|
|