三七 1 settimana fa
parent
commit
547edd05b1

+ 8 - 30
fs-qw-task/src/main/java/com/fs/app/taskService/impl/SopLogsTaskServiceImpl.java

@@ -2413,36 +2413,6 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
         }
 
 
-        FsCourseRealLink courseMap = new FsCourseRealLink();
-        courseMap.setCompanyId(link.getCompanyId());
-        courseMap.setQwUserId(link.getQwUserId());
-        courseMap.setCompanyUserId(link.getCompanyUserId());
-        courseMap.setVideoId(link.getVideoId());
-        courseMap.setCorpId(link.getCorpId());
-        courseMap.setCourseId(link.getCourseId());
-        courseMap.setQwExternalId(link.getQwExternalId());
-        courseMap.setUNo(link.getUNo());
-
-        if (StringUtil.strIsNullOrEmpty(isOfficial)) {
-            courseMap.setLinkType(0);
-        } else {
-            if (isOfficial.equals("1")) {
-                if (fsUserId == null || Long.valueOf(0L).equals(fsUserId)) {
-                    courseMap.setLinkType(0);
-                } else {
-                    courseMap.setLinkType(5);
-                }
-            } else if (isOfficial.equals("0")) {
-                courseMap.setLinkType(0);
-            } else {
-                courseMap.setLinkType(0);
-            }
-        }
-
-        String courseJson = JSON.toJSONString(courseMap);
-        String realLinkFull = REAL_LINK_PREFIX + courseJson;
-        link.setRealLink(realLinkFull);
-
         String randomString = ShortCodeGeneratorUtils.generate8();
         if (StringUtil.strIsNullOrEmpty(randomString)) {
             link.setLink(UUID.randomUUID().toString().replace("-", ""));
@@ -2452,6 +2422,14 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
 
         link.setCreateTime(sendTime);
 
+        FsCourseRealLink courseMap = new FsCourseRealLink();
+        BeanUtils.copyProperties(link, courseMap);
+
+        String courseJson = JSON.toJSONString(courseMap);
+        String realLinkFull = REAL_LINK_PREFIX + courseJson;
+        link.setRealLink(realLinkFull);
+
+
         Integer expireDays = (setting.getExpiresDays() == null || setting.getExpiresDays() == 0)
                 ? config.getVideoLinkExpireDate()
                 : setting.getExpiresDays();