瀏覽代碼

feature/0803-im

zouxuan 2 年之前
父節點
當前提交
2653822eca

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/ImNetworkRoomMember.java

@@ -37,7 +37,7 @@ public class ImNetworkRoomMember implements Serializable {
 
     @TableField("username_")
     @ApiModelProperty(value = "用户名")
-    private String username;
+    private String userName;
 
     @TableField("avatar_")
     @ApiModelProperty(value = "用户头像")

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImNetworkRoomMemberServiceImpl.java

@@ -53,7 +53,7 @@ public class ImNetworkRoomMemberServiceImpl extends ServiceImpl<ImNetworkRoomMem
             roomMember.setMicrophone(microphone);
             roomMember.setMusicModeOn(false);
             roomMember.setRole(userRole.getValue());
-            roomMember.setUsername(sysUser.getUsername());
+            roomMember.setUserName(sysUser.getUsername());
             roomMember.setAvatar(sysUser.getAvatar());
             roomMember.setUserId(sysUser.getImUserId());
             baseMapper.insert(roomMember);

+ 3 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImServiceImpl.java

@@ -486,7 +486,7 @@ public class ImServiceImpl implements ImService {
                     .type(ImNetworkActionEnum.REJECT.ordinal())
                     .enable(deviceControl.getEnable())
                     .targetId(roomMember.getUserId())
-                    .targetName(roomMember.getUsername())
+                    .targetName(roomMember.getUserName())
                     .sendUserInfo(build);
 
             RTCRoomMessage roomMessage = RTCRoomMessage.builder()
@@ -503,7 +503,7 @@ public class ImServiceImpl implements ImService {
             ImNetworkControlDeviceNotifyMessage msg = new ImNetworkControlDeviceNotifyMessage(ImNetworkActionEnum.REJECT.ordinal());
             msg.setType(deviceControl.getDeviceType().ordinal());
             msg.setOpUserId(roomMember.getUserId());
-            msg.setOpUserName(roomMember.getUsername());
+            msg.setOpUserName(roomMember.getUserName());
             imHelper.publishMessage(roomMember.getUserId(),
                     imGroupService.getImUserId(teacher.getUserId(),ClientEnum.TEACHER), roomMember.getRoomId(), msg);
         }
@@ -512,7 +512,7 @@ public class ImServiceImpl implements ImService {
     private RTCRoomMessage.MessageUser getSendUser(ImNetworkRoomMember roomMember) {
         RTCRoomMessage.MessageUser build = RTCRoomMessage.MessageUser.builder()
                 .sendUserId(roomMember.getUserId())
-                .sendUserName(roomMember.getUsername())
+                .sendUserName(roomMember.getUserName())
                 .avatarUrl(roomMember.getAvatar())
                 .build();
         return build;

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/RoomServiceImpl.java

@@ -92,7 +92,7 @@ public class RoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNetworkRoom
             // 腾讯云RTC
             // 用户IM帐号创建
             try {
-                pluginService.register(roomMember.getUserId(), roomMember.getUsername(), roomMember.getAvatar());
+                pluginService.register(roomMember.getUserId(), roomMember.getUserName(), roomMember.getAvatar());
             } catch (Exception e) {
                 log.error("直播房间用户注册失败: userId={}", roomMember.getUserId(), e);
             }