فهرست منبع

直播房间添加字段

liujc 1 سال پیش
والد
کامیت
fafc2234af

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

@@ -1,6 +1,8 @@
 package com.ym.mec.biz.dal.dto;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.ym.mec.auth.api.enums.SysUserType;
+import com.ym.mec.biz.dal.enums.EUseScene;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -56,6 +58,9 @@ public class ImLiveBroadcastRoomDto implements Serializable {
     @ApiModelProperty(value = "直播间可见类型-全部可见 ALL / 部分可见 PRIVATE")
     private String popularizeType;
 
+
+    @ApiModelProperty("使用场景 正常:NORMAL 音乐:MUSIC")
+    private EUseScene useScene;
     @ApiModelProperty(value = "播出端-  pc网页端 移动端mobile")
     private String os = "pc";
 
@@ -121,6 +126,14 @@ public class ImLiveBroadcastRoomDto implements Serializable {
         }
     }
 
+    public EUseScene getUseScene() {
+        return useScene;
+    }
+
+    public void setUseScene(EUseScene useScene) {
+        this.useScene = useScene;
+    }
+
     public SysUserType getClientType() {
         return clientType;
     }

+ 15 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/ImLiveBroadcastRoom.java

@@ -5,6 +5,7 @@ import java.util.Date;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.ym.mec.auth.api.enums.SysUserType;
+import com.ym.mec.biz.dal.enums.EUseScene;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import com.baomidou.mybatisplus.annotation.TableId;
@@ -36,6 +37,11 @@ public class ImLiveBroadcastRoom implements Serializable {
     private Integer speakerId;
 
 
+    @TableField("use_scene_")
+    @ApiModelProperty("使用场景 正常:NORMAL 音乐:MUSIC")
+    private EUseScene useScene;
+
+
     @TableField("client_type_")
     @ApiModelProperty("用户类型 TEACHER 老师 EDUCATION 教务端")
     private SysUserType clientType;
@@ -124,6 +130,15 @@ public class ImLiveBroadcastRoom implements Serializable {
     @ApiModelProperty(value = "更新时间")
     private Date updatedTime;
 
+
+    public EUseScene getUseScene() {
+        return useScene;
+    }
+
+    public void setUseScene(EUseScene useScene) {
+        this.useScene = useScene;
+    }
+
     private static final long serialVersionUID = 1L;
 
     public SysUserType getClientType() {

+ 40 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/EUseScene.java

@@ -0,0 +1,40 @@
+package com.ym.mec.biz.dal.enums;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+import com.ym.mec.common.enums.BaseEnum;
+
+public enum EUseScene  implements BaseEnum<String, EUseScene> {
+
+    /**
+     * 正常
+     */
+    NORMAL( "正常"),
+
+    /**
+     * 音乐
+     */
+    MUSIC( "音乐"),
+
+    ;
+
+    @EnumValue
+    private String code;
+
+    private String msg;
+
+    EUseScene(String msg) {
+        this.code = this.name();
+        this.msg = msg;
+    }
+
+
+    /**
+     * 获取枚举类的code值
+     *
+     * @return
+     */
+    @Override
+    public String getCode() {
+        return this.code;
+    }
+}

+ 15 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomDetailVo.java

@@ -1,5 +1,7 @@
 package com.ym.mec.biz.dal.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.ym.mec.biz.dal.enums.EUseScene;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.io.Serializable;
@@ -45,6 +47,19 @@ public class ImLiveBroadcastRoomDetailVo implements Serializable {
     @ApiModelProperty(value = "直播状态 0未开始 1开始 2已结束")
     private Integer liveState;
 
+
+    @ApiModelProperty("使用场景 正常:NORMAL 音乐:MUSIC")
+    private EUseScene useScene;
+
+
+    public EUseScene getUseScene() {
+        return useScene;
+    }
+
+    public void setUseScene(EUseScene useScene) {
+        this.useScene = useScene;
+    }
+
     private List<ImLiveRoomVideoVo> videoList;
 
     public Integer getLiveTotalTime() {

+ 13 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/vo/ImLiveBroadcastRoomVo.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.microsvc.toolkit.middleware.live.message.LiveRoomConfig;
 import com.ym.mec.auth.api.enums.SysUserType;
+import com.ym.mec.biz.dal.enums.EUseScene;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -126,6 +127,18 @@ public class ImLiveBroadcastRoomVo implements Serializable {
     @ApiModelProperty("视频数量")
     private Integer videoNum;
 
+
+    @ApiModelProperty("使用场景 正常:NORMAL 音乐:MUSIC")
+    private EUseScene useScene;
+
+    public EUseScene getUseScene() {
+        return useScene;
+    }
+
+    public void setUseScene(EUseScene useScene) {
+        this.useScene = useScene;
+    }
+
     public Integer getVideoNum() {
         return videoNum;
     }

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/ImLiveBroadcastRoomDataMapper.xml

@@ -39,7 +39,8 @@
                ifnull(r.live_total_time_, 0)     as liveTotalTime,
                r.live_start_time_      as liveStartTime,
                r.live_end_time_      as liveEndTime,
-               r.live_state_      as liveState
+               r.live_state_      as liveState,
+                r.use_scene_ as useScene
         from im_live_broadcast_room_data as a
                  left join im_live_broadcast_room AS r on a.room_uid_ = r.room_uid_
                  left join sys_user AS b on r.speaker_id_ = b.id_

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/ImLiveBroadcastRoomMapper.xml

@@ -64,7 +64,8 @@
         a.push_status_ AS pushStatus,
         a.ban_status_ AS banStatus,
         a.created_time_ AS createdTime,
-        a.service_provider_ as serviceProvider
+        a.service_provider_ as serviceProvider,
+        a.use_scene_ as useScene
         from im_live_broadcast_room as a
         left join tenant_info AS t on a.tenant_id_ = t.id_
         left join sys_user AS b on a.speaker_id_ = b.id_