消息增加昵称字段
This commit is contained in:
parent
172019c0b1
commit
20e7863461
@ -129,7 +129,7 @@ public class RocketLaunchCmdExe {
|
||||
try {
|
||||
List<LiveMicUserDTO> 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);
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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()
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user