瀏覽代碼

Merge branch 'dev_v1.3.5_20220927'

Eric 2 年之前
父節點
當前提交
1ab2813de3

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

@@ -53,12 +53,14 @@ public class ImNetworkRoomMemberServiceImpl extends ServiceImpl<ImNetworkRoomMem
             roomMember.setCourseScheduleId(Long.parseLong(roomId));
             baseMapper.insert(roomMember);
 
-            String imUserId = String.valueOf(sysUser.getUserId());
-            if (UserRoleEnum.STUDENT == userRole) {
-                imUserId = MessageFormat.format("{0}:{1}", imUserId, ClientEnum.STUDENT.name());
-            }
-            roomMember.setImUserId(imUserId);
         }
+
+        String imUserId = String.valueOf(sysUser.getUserId());
+        if (UserRoleEnum.STUDENT == userRole) {
+            imUserId = MessageFormat.format("{0}:{1}", imUserId, ClientEnum.STUDENT.name());
+        }
+        roomMember.setImUserId(imUserId);
+
         return roomMember;
     }
 

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

@@ -400,7 +400,7 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Transactional(rollbackFor = Exception.class)
     public void batchControlDevice(ImNetworkDeviceControlDto deviceControl) throws Exception {
         ImNetworkDeviceTypeEnum deviceType = deviceControl.getDeviceType();
-        if (deviceControl.getUserId() != null) {
+        if (StringUtils.isNotEmpty(deviceControl.getUserId())) {
             controlDevice(deviceControl);
         } else {
             if (deviceType == ImNetworkDeviceTypeEnum.EXAM_SONG ||