Browse Source

feat: 企微完课打标签

xdd 4 days ago
parent
commit
af059852eb

+ 1 - 1
fs-ipad-task/src/test/java/com/fs/app/task/SendMsgTest.java

@@ -41,7 +41,7 @@ public class SendMsgTest {
 
         for(Long logId : testLogIds){
             FsCourseWatchLog fsCourseWatchLog = fsCourseWatchLogMapper.selectFsCourseWatchLogByLogId(logId);
-            fsTagUpdateService.onCourseWatchFinishedBatch(Collections.singletonList(fsCourseWatchLog));
+            fsTagUpdateService.onCourseWatchingBatch(Collections.singletonList(fsCourseWatchLog));
         }
     }
 

+ 1 - 1
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoMapper.java

@@ -257,7 +257,7 @@ public interface FsUserCourseVideoMapper
 
     FsUserCourseVO selectFsUserCourseVideoVoByVideoIdAndCourdeId(@Param("videoId") Long videoId,@Param("courseId") Long courseId);
 
-    @Select("select video_id,is_first,course_sort from fs_user_course_video")
+    @Select("select video_id,is_first,course_sort,tg_id,watching_tg_id,watched_tg_id,watching_tag_id,watched_tag_id,tag_group_id from fs_user_course_video")
     @MapKey("videoId")
     Map<Long, FsUserCourseVideo> selectAllMap();
 }

+ 8 - 2
fs-service/src/main/java/com/fs/tag/service/impl/FsTagUpdateServiceImpl.java

@@ -133,7 +133,10 @@ public class FsTagUpdateServiceImpl implements FsTagUpdateService {
             task.setQwUserId(item.getQwUserId());
 
             FsUserCourseVideo fsUserCourseVideo = courseVideoMap.get(task.getVideoId());
-
+            String corpId = qwUserCacheService.queryCorpIdByQwUserId(item.getQwUserId());
+            if(StringUtils.isNotNull(corpId)){
+                task.setCorpId(corpId);
+            }
             if(ObjectUtils.isNull(fsUserCourseVideo)) {
                 String errorMsg = String.format("该条记录 %d 找不到对应的课堂视频", task.getVideoId());
                 log.error(errorMsg);
@@ -187,7 +190,10 @@ public class FsTagUpdateServiceImpl implements FsTagUpdateService {
             task.setQwExternalContactId(item.getQwExternalContactId());
             task.setQwUserId(item.getQwUserId());
             task.setLogType(1);
-
+            String corpId = qwUserCacheService.queryCorpIdByQwUserId(item.getQwUserId());
+            if(StringUtils.isNotNull(corpId)){
+                task.setCorpId(corpId);
+            }
             FsUserCourseVideo fsUserCourseVideo = courseVideoMap.get(task.getVideoId());
             if(ObjectUtils.isNull(fsUserCourseVideo)) {
                 String errorMsg = String.format("该条记录 %d 找不到对应的课堂视频", task.getVideoId());