浏览代码

直播使用sop发送

lmx 6 天之前
父节点
当前提交
794c936224

+ 1 - 1
fs-service/src/main/java/com/fs/live/mapper/LiveWatchLogMapper.java

@@ -69,6 +69,6 @@ public interface LiveWatchLogMapper extends BaseMapper<LiveWatchLog> {
 
     LiveWatchLog selectOneLogByLiveIdAndQwUserIdAndExternalId(@Param("liveId")Long liveId,@Param("qwUserId")String qwUserId,@Param("externalContactId")Long externalContactId);
 
-
+    List<LiveWatchLog> selectLiveWatchLogByLiveId(@Param("liveId")Long liveId);
 
 }

+ 5 - 0
fs-service/src/main/java/com/fs/live/service/ILiveWatchUserService.java

@@ -134,4 +134,9 @@ public interface ILiveWatchUserService {
     LiveWatchUserEntry selectLiveWatchAndCompanyUserByFlag(Long liveId, Long userId, Integer liveFlag, Integer replayFlag);
 
     void updateLiveWatchUserEntry(LiveWatchUserEntry liveWatchUser);
+
+    /**
+     * 根据用户直播看课记录来打标签
+     */
+    void qwTagMarkByLiveWatchLog(Long liveId);
 }

+ 21 - 4
fs-service/src/main/java/com/fs/live/service/impl/LiveWatchUserServiceImpl.java

@@ -22,13 +22,11 @@ import com.fs.live.domain.Live;
 import com.fs.live.domain.LiveVideo;
 import com.fs.live.domain.LiveWatchLog;
 import com.fs.live.domain.LiveWatchUser;
-import com.fs.live.mapper.LiveWatchLogMapper;
-import com.fs.live.mapper.LiveWatchUserMapper;
-import com.fs.live.mapper.LiveMapper;
-import com.fs.live.mapper.LiveVideoMapper;
+import com.fs.live.mapper.*;
 import com.fs.live.param.LiveIsAddKfParam;
 import com.fs.live.service.ILiveWatchUserService;
 import com.fs.live.vo.LiveWatchUserEntry;
+import com.fs.live.vo.LiveTagItemVO;
 import com.fs.live.vo.LiveWatchUserStatistics;
 import com.fs.live.vo.LiveWatchUserVO;
 import com.fs.qw.domain.QwExternalContact;
@@ -83,6 +81,10 @@ public class LiveWatchUserServiceImpl implements ILiveWatchUserService {
     @Autowired
     private ISopUserLogsInfoService iSopUserLogsInfoService;
 
+    @Autowired
+    LiveTagConfigMapper liveTagConfigMapper;
+
+
     private static final Logger logger = LoggerFactory.getLogger(LiveWatchUserServiceImpl.class);
 
     /**
@@ -742,4 +744,19 @@ public class LiveWatchUserServiceImpl implements ILiveWatchUserService {
 
     }
 
+    /**
+     * 根据用户直播看课记录来打标签
+     */
+    @Override
+    public void qwTagMarkByLiveWatchLog(Long liveId) {
+        //查询直播间的标签配置
+        List<LiveTagItemVO> liveTagConfig = liveTagConfigMapper.getLiveTagListByliveId(liveId);
+        //查询直播间的看课记录
+        List<LiveWatchLog> liveWatchLogs = liveWatchLogMapper.selectLiveWatchLogByLiveId(liveId);
+
+        //根据配置给每位用户打上标签
+
+
+    }
+
 }

+ 4 - 1
fs-service/src/main/resources/mapper/live/LiveWatchLogMapper.xml

@@ -206,5 +206,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectOneLogByLiveIdAndQwUserIdAndExternalId"  resultType="com.fs.live.domain.LiveWatchLog">
         select * from live_watch_log where live_id = #{liveId} and qw_user_id = #{qwUserId} and external_contact_id = #{externalContactId}
     </select>
-
+<!--    todo lmx-->
+    <select id="selectLiveWatchLogByLiveId" resultType="com.fs.live.domain.LiveWatchLog">
+        select * from live_watch_log
+    </select>
 </mapper>