From 20e786346180f2de221091a914c18656792f5dff Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 13 Nov 2025 19:33:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=A2=9E=E5=8A=A0=E6=98=B5?= =?UTF-8?q?=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circle/other/app/command/rocket/RocketLaunchCmdExe.java | 2 +- .../other/app/command/rocket/RocketRewardClaimCmdExe.java | 5 ++++- .../red/circle/other/app/command/room/RoomEnterCmdExe.java | 4 +++- .../red/circle/other/app/manager/RocketImPushManager.java | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketLaunchCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketLaunchCmdExe.java index a797dbc5..019b1e2f 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketLaunchCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketLaunchCmdExe.java @@ -129,7 +129,7 @@ public class RocketLaunchCmdExe { try { List userDTOS = liveRoomUserClient.userList(roomId).getBody(); userDTOS.forEach(userDTO -> { - rocketRewardClaimCmdExe.executeAsync(roomId, roomAccount, userDTO.getId()); + rocketRewardClaimCmdExe.executeAsync(roomId, roomAccount, userDTO.getId(), userDTO.getUserNickname()); }); } catch (Exception e) { log.error("给所有在线的用户发送奖励失败: roomId={}", roomId, e); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketRewardClaimCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketRewardClaimCmdExe.java index 9fe06bdc..87bf4689 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketRewardClaimCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/rocket/RocketRewardClaimCmdExe.java @@ -15,6 +15,7 @@ import com.red.circle.other.domain.gateway.RocketConfigGateway; import com.red.circle.other.domain.gateway.RocketHistoryGateway; import com.red.circle.other.domain.gateway.RocketRewardLogGateway; import com.red.circle.other.domain.gateway.RocketStatusGateway; +import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.propcoupon.PropCouponSource; import com.red.circle.other.domain.rocket.*; import com.red.circle.other.infra.common.props.PropsSendCommon; @@ -62,6 +63,7 @@ public class RocketRewardClaimCmdExe { private final BadgeBackpackClient badgeBackpackClient; private final RocketHistoryGateway rocketHistoryGateway; private final PropsSendCommon propsSendCommon; + private final UserProfileGateway userProfileGateway; private final Random random = new Random(); /** @@ -79,7 +81,7 @@ public class RocketRewardClaimCmdExe { * 无返回值,静默领取 */ @Async("rocketRewardExecutor") - public void executeAsync(Long roomId, String roomAccount, Long userId) { + public void executeAsync(Long roomId, String roomAccount, Long userId, String userNickname) { try { log.debug("异步自动领取火箭奖励: roomId={}, userId={}", roomId, userId); @@ -95,6 +97,7 @@ public class RocketRewardClaimCmdExe { map.put("cover", result.getCover()); map.put("rocketLevel", result.getRocketLevel()); map.put("userId", userId); + map.put("userNickname", userNickname); imGroupClient.sendCustomMessage(roomAccount, CustomGroupMsgBodyCmd.builder() .type(GroupMessageTypeEnum.ROCKET_REWARD_USER) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java index d8f212f2..ff190b32 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java @@ -21,6 +21,7 @@ import com.red.circle.other.app.dto.cmd.room.UpdateRoomSettingCmd; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway; import com.red.circle.other.domain.model.user.NobleAbilityCO; +import com.red.circle.other.domain.model.user.UserProfile; import com.red.circle.other.infra.database.cache.service.other.RoomManagerCacheService; import com.red.circle.other.infra.database.cache.service.user.UserAgoraTokenCacheService; import com.red.circle.other.infra.database.mongo.entity.live.RoomProfile; @@ -128,7 +129,8 @@ public class RoomEnterCmdExe { // 自动领取火箭奖励 try { - rocketRewardClaimCmdExe.executeAsync(cmd.getRoomId(), manager.getRoomAccount(), cmd.getReqUserId()); + UserProfile userProfile = userProfileGateway.getByUserId(cmd.getReqUserId()); + rocketRewardClaimCmdExe.executeAsync(cmd.getRoomId(), manager.getRoomAccount(), cmd.getReqUserId(), userProfile.getUserNickname()); } catch (Exception e) { log.error("触发自动领取火箭奖励失败: roomId={}, userId={}", cmd.getRoomId(), cmd.getReqUserId(), e); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/manager/RocketImPushManager.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/manager/RocketImPushManager.java index 62e6530f..d813ac9c 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/manager/RocketImPushManager.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/manager/RocketImPushManager.java @@ -55,7 +55,7 @@ public class RocketImPushManager { imGroupClient.sendMessageBroadcast( BroadcastGroupMsgBodyCmd.builder() .toPlatform(SysOriginPlatformEnum.LIKEI) - .type(GroupMessageTypeEnum.ROCKET_ENERGY_LAUNCH) +// .type(GroupMessageTypeEnum.ROCKET_ENERGY_LAUNCH) .data(status) .build() );