From dde4887ed68689c7f5f0793fd4266fe6017cd182 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 28 Nov 2025 15:55:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=BF=9D=E8=A7=84=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/command/violation/user/UserViolationAdjustCmdExe.java | 4 +++- .../command/violation/user/UserViolationWarningCmdExe.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationAdjustCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationAdjustCmdExe.java index 66154914..a5862466 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationAdjustCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationAdjustCmdExe.java @@ -50,9 +50,11 @@ public class UserViolationAdjustCmdExe { @Transactional(rollbackFor = Exception.class) public ViolationHandleResultCO execute(UserViolationHandleCmd cmd) { + ViolationTypeEnum violationTypeEnum = ViolationTypeEnum.getByCode(cmd.getViolationType()); + // 1. 权限验证 ResponseAssert.isTrue(CommonErrorCode.INSUFFICIENT_PERMISSION, administratorService.existsAdmin(cmd.getReqUserId()) && - administratorAuthService.existsAuth(cmd.requiredReqUserId(), ManagerApprovalType.USER_AVATAR.name())); + administratorAuthService.existsAuth(cmd.requiredReqUserId(), violationTypeEnum.name())); // 2. 查询用户信息 UserProfile userProfile = userProfileGateway.getByUserId(cmd.getUserId()); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationWarningCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationWarningCmdExe.java index 5e41f70e..635968b4 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationWarningCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/violation/user/UserViolationWarningCmdExe.java @@ -47,9 +47,11 @@ public class UserViolationWarningCmdExe { @Transactional(rollbackFor = Exception.class) public ViolationHandleResultCO execute(UserViolationHandleCmd cmd) { + ViolationTypeEnum violationTypeEnum = ViolationTypeEnum.getByCode(cmd.getViolationType()); + // 1. 权限验证 ResponseAssert.isTrue(CommonErrorCode.INSUFFICIENT_PERMISSION,administratorService.existsAdmin(cmd.getReqUserId()) && - administratorAuthService.existsAuth(cmd.requiredReqUserId(), ManagerApprovalType.USER_NICKNAME.name())); + administratorAuthService.existsAuth(cmd.requiredReqUserId(), violationTypeEnum.name())); // 2. 查询用户信息 UserProfile userProfile = userProfileGateway.getByUserId(cmd.getUserId());