|
@@ -1368,15 +1368,14 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
link.setUNo(UUID.randomUUID().toString());
|
|
link.setUNo(UUID.randomUUID().toString());
|
|
|
link.setQwUserId(Long.valueOf(qwUserId));
|
|
link.setQwUserId(Long.valueOf(qwUserId));
|
|
|
link.setCompanyUserId(Long.parseLong(companyUserId));
|
|
link.setCompanyUserId(Long.parseLong(companyUserId));
|
|
|
- link.setVideoId(videoId.longValue());
|
|
|
|
|
|
|
+ link.setVideoId(videoId);
|
|
|
link.setCorpId(logVo.getCorpId());
|
|
link.setCorpId(logVo.getCorpId());
|
|
|
- link.setCourseId(courseId.longValue());
|
|
|
|
|
|
|
+ link.setCourseId(courseId);
|
|
|
link.setQwExternalId(Long.parseLong(externalId));
|
|
link.setQwExternalId(Long.parseLong(externalId));
|
|
|
|
|
|
|
|
if (StringUtil.strIsNullOrEmpty(isOfficial)) {
|
|
if (StringUtil.strIsNullOrEmpty(isOfficial)) {
|
|
|
link.setLinkType(0);
|
|
link.setLinkType(0);
|
|
|
} else {
|
|
} else {
|
|
|
-// link.setLinkType(isOfficial.equals("1") ? 5 : 0);
|
|
|
|
|
if (isOfficial.equals("1")) {
|
|
if (isOfficial.equals("1")) {
|
|
|
if (fsUserId == null || Long.valueOf(0L).equals(fsUserId)) {
|
|
if (fsUserId == null || Long.valueOf(0L).equals(fsUserId)) {
|
|
|
link.setLinkType(0);
|
|
link.setLinkType(0);
|
|
@@ -1391,36 +1390,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());
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- 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();
|
|
String randomString = ShortCodeGeneratorUtils.generate8();
|
|
|
if (StringUtil.strIsNullOrEmpty(randomString)) {
|
|
if (StringUtil.strIsNullOrEmpty(randomString)) {
|
|
|
link.setLink(UUID.randomUUID().toString().replace("-", ""));
|
|
link.setLink(UUID.randomUUID().toString().replace("-", ""));
|
|
@@ -1430,6 +1399,14 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
|
|
|
|
|
link.setCreateTime(sendTime);
|
|
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)
|
|
Integer expireDays = (setting.getExpiresDays() == null || setting.getExpiresDays() == 0)
|
|
|
? config.getVideoLinkExpireDate()
|
|
? config.getVideoLinkExpireDate()
|
|
|
: setting.getExpiresDays();
|
|
: setting.getExpiresDays();
|