Explorar o código

1、调整优惠卷展示方式没

yys hai 1 semana
pai
achega
1d9a72ac88

+ 3 - 0
fs-service/src/main/java/com/fs/live/domain/Live.java

@@ -139,6 +139,9 @@ public class   Live extends BaseEntity {
     /** 是否显示购物车 0否 1是 */
     private Integer showCart;
 
+    /** 弹窗位置 1中间 2右下角 */
+    private Integer popupPosition;
+
     private String roomPassword;
 
     // 是否需要秘钥

+ 3 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -392,6 +392,9 @@ public class LiveServiceImpl implements ILiveService
 
         // liveVo.setStoreId(storeId);
 		BeanUtils.copyProperties(live, liveVo);
+        if (liveVo.getPopupPosition() == null) {
+            liveVo.setPopupPosition(1);
+        }
 		liveVo.setNowDuration(200L);
 
         Boolean completionPointsEnabled = false;

+ 2 - 0
fs-service/src/main/java/com/fs/live/vo/LiveVo.java

@@ -60,6 +60,8 @@ public class LiveVo {
     private Integer globalVisible;
     /** 是否显示购物车 0否 1是 */
     private Integer showCart;
+    /** 弹窗位置 1中间 2右下角 */
+    private Integer popupPosition;
     private Integer liveFlag;
 
     /** 是否开启直播完课积分功能 */

+ 9 - 4
fs-service/src/main/resources/mapper/live/LiveMapper.xml

@@ -34,19 +34,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="liveCodeUrl"    column="live_code_url"    />
         <result property="globalVisible"    column="global_visible"    />
         <result property="showCart"    column="show_cart"    />
+        <result property="popupPosition"    column="popup_position"    />
         <result property="roomPassword"    column="room_password"    />
     </resultMap>
 
     <sql id="selectLiveVo">
         select live_id, company_id, company_user_id,talent_id, live_name, is_audit, live_desc, show_type, status, anchor_id, live_type, start_time, finish_time,
                live_img_url, live_config, id_card_url, is_show, is_del, qw_qr_code, rtmp_url, flv_hls_url,
-               create_time, create_by, update_by, update_time, remark,config_json,global_visible,show_cart,room_password from live
+               create_time, create_by, update_by, update_time, remark,config_json,global_visible,show_cart,popup_position,room_password from live
     </sql>
 
     <select id="liveList" parameterType="Live" resultMap="LiveResult">
         select a.live_id, a.company_id, a.company_user_id,talent_id, a.live_name, a.is_audit, a.live_desc, a.show_type, a.status, a.anchor_id,
         a.live_type, a.start_time, a.finish_time, a.live_img_url, a.live_config, a.id_card_url, a.is_show, a.is_del, a.qw_qr_code, a.rtmp_url,
-        a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,c.company_name,b.file_size,a.global_visible,a.show_cart
+        a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,c.company_name,b.file_size,a.global_visible,a.show_cart,a.popup_position
         from live
         a
         left join live_video b on a.live_id = b.live_id
@@ -58,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectReadyStartLiveList" parameterType="Live" resultMap="LiveResult">
         select a.live_id, a.company_id, a.company_user_id,talent_id, a.live_name, a.is_audit, a.live_desc, a.show_type, a.status, a.anchor_id,
         a.live_type, a.start_time, a.finish_time, a.live_img_url, a.live_config, a.id_card_url, a.is_show, a.is_del, a.qw_qr_code, a.rtmp_url,
-        a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,c.company_name,b.file_size,a.global_visible,a.show_cart
+        a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,c.company_name,b.file_size,a.global_visible,a.show_cart,a.popup_position
         from live
         a
         left join live_video b on a.live_id = b.live_id
@@ -72,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectLiveList" parameterType="com.fs.live.domain.Live" resultMap="LiveResult">
         select a.live_id, a.company_id, a.company_user_id,talent_id, a.live_name, a.is_audit, a.live_desc, a.show_type, a.status, a.anchor_id,
                a.live_type, a.start_time, a.finish_time, a.live_img_url, a.live_config, a.id_card_url, a.is_show, a.is_del, a.qw_qr_code, a.rtmp_url,
-               a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,a.global_visible,a.show_cart,a.room_password
+               a.flv_hls_url, a.create_time, a.create_by, a.update_by, a.update_time, a.remark,config_json, b.video_url,a.global_visible,a.show_cart,a.popup_position,a.room_password
                 ,c.live_code_url,IFNULL(d.company_name, '总台') AS company_name,b.file_size
 
         from live a
@@ -164,6 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="idCardUrl != null">id_card_url,</if>
             <if test="globalVisible != null">global_visible,</if>
             <if test="showCart != null">show_cart,</if>
+            <if test="popupPosition != null">popup_position,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyId != null">#{companyId},</if>
@@ -194,6 +196,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="idCardUrl != null">#{idCardUrl},</if>
             <if test="globalVisible != null">#{globalVisible},</if>
             <if test="showCart != null">#{showCart},</if>
+            <if test="popupPosition != null">#{popupPosition},</if>
          </trim>
     </insert>
 
@@ -227,6 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="idCardUrl != null">id_card_url = #{idCardUrl},</if>
             <if test="globalVisible != null">global_visible = #{globalVisible},</if>
             <if test="showCart != null">show_cart = #{showCart},</if>
+            <if test="popupPosition != null">popup_position = #{popupPosition},</if>
             <if test="roomPassword != null">room_password = #{roomPassword},</if>
         </trim>
         where live_id = #{liveId}
@@ -311,6 +315,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 <if test="live.remark != null and live.remark != ''">remark = #{live.remark},</if>
                 <if test="live.globalVisible != null and live.globalVisible != ''">global_visible = #{live.globalVisible},</if>
                 <if test="live.showCart != null and live.showCart != ''">show_cart = #{live.showCart},</if>
+                <if test="live.popupPosition != null">popup_position = #{live.popupPosition},</if>
                 update_time = NOW()
             </set>
             WHERE live_id = #{live.liveId}