Переглянути джерело

增加:是否允许连麦参数

hgw 3 роки тому
батько
коміт
badb494f6a

+ 11 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/ImLiveBroadcastRoomDto.java

@@ -61,6 +61,9 @@ public class ImLiveBroadcastRoomDto implements Serializable {
         @ApiModelProperty(value = "是否允许保存直播回放 0允许 1不允许")
         private Integer whether_video = 1;
 
+        @ApiModelProperty(value = "是否允许连麦 0允许 1不允许")
+        private Integer whether_mic = 0;
+
         public Integer getWhether_like() {
             return whether_like;
         }
@@ -84,6 +87,14 @@ public class ImLiveBroadcastRoomDto implements Serializable {
         public void setWhether_video(Integer whether_video) {
             this.whether_video = whether_video;
         }
+
+        public Integer getWhether_mic() {
+            return whether_mic;
+        }
+
+        public void setWhether_mic(Integer whether_mic) {
+            this.whether_mic = whether_mic;
+        }
     }
 
     public Integer getId() {

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImLiveBroadcastRoomServiceImpl.java

@@ -157,8 +157,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
         ImLiveBroadcastRoom obj = new ImLiveBroadcastRoom();
         BeanUtils.copyProperties(dto, obj);
         Date now = new Date();
-        String nano = now.getTime() + "";
-        String roomUid = "LIVE-" + sysUser.getId() + "-" + nano;
+        String roomUid = "LIVE-" + sysUser.getId() + "-" + now.getTime();
         obj.setTenantId(TenantContextHolder.getTenantId());
         obj.setRoomUid(roomUid);
         obj.setRoomConfig(JSONObject.toJSONString(dto.getRoomConfig()));
@@ -259,6 +258,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
     }
 
     private void destroyExpiredLiveRoom(Date now, ImLiveBroadcastRoom room, int expiredMinute) {
+        log.error("roomDestroy destroyExpiredLiveRoom >>>> now {} roomInfo : {} expiredMinute:{}", now, JSONObject.toJSONString(room), expiredMinute);
         //过期时间= 房间正式开始时间+expiredMinute 分钟
         Date expiredTime = DateUtil.addMinutes(room.getCreatedTime(), expiredMinute);
         // 现在 大于等于 过期时间
@@ -309,6 +309,7 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
     }
 
     public void roomDestroy(ImLiveBroadcastRoom room) {
+        log.error("roomDestroy>>>> room : {}", JSONObject.toJSONString(room));
         String roomUid = room.getRoomUid();
         Integer speakerId = room.getSpeakerId();
         try {