|
@@ -92,6 +92,7 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
private static final String REAL_LINK_PREFIX = "/courseH5/pages/course/learning?course=";
|
|
private static final String REAL_LINK_PREFIX = "/courseH5/pages/course/learning?course=";
|
|
|
private static final String SHORT_LINK_PREFIX = "/courseH5/pages/course/learning?s=";
|
|
private static final String SHORT_LINK_PREFIX = "/courseH5/pages/course/learning?s=";
|
|
|
private static final String miniappRealLink = "/pages_course/video.html?course=";
|
|
private static final String miniappRealLink = "/pages_course/video.html?course=";
|
|
|
|
|
+ private static final String h5miniappLink = "/pages_course/shortLink.html?s=";
|
|
|
private static final String appRealLink = "/pages/courseAnswer/index?link=";
|
|
private static final String appRealLink = "/pages/courseAnswer/index?link=";
|
|
|
private static final String appActivitlLink = "/pages_course/activity.html?link=";
|
|
private static final String appActivitlLink = "/pages_course/activity.html?link=";
|
|
|
private static final String appLink = "https://jump.ylrztop.com/jumpapp/pages/index/index?link=";
|
|
private static final String appLink = "https://jump.ylrztop.com/jumpapp/pages/index/index?link=";
|
|
@@ -571,7 +572,8 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
if (vo == null) return null;
|
|
if (vo == null) return null;
|
|
|
QwSopLogs sopLogs = new QwSopLogs();
|
|
QwSopLogs sopLogs = new QwSopLogs();
|
|
|
|
|
|
|
|
- sopLogs.setQwUserid(qwUser.getQwUserId());
|
|
|
|
|
|
|
+ String qwUserId = qwUser.getQwUserId();
|
|
|
|
|
+ sopLogs.setQwUserid(qwUserId);
|
|
|
sopLogs.setExternalUserId(vo.getExternalUserId());
|
|
sopLogs.setExternalUserId(vo.getExternalUserId());
|
|
|
sopLogs.setLogType(2);
|
|
sopLogs.setLogType(2);
|
|
|
sopLogs.setContentJson(param.getSetting());
|
|
sopLogs.setContentJson(param.getSetting());
|
|
@@ -590,7 +592,7 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
sopLogs.setQwUserKey(qwUser.getId());
|
|
sopLogs.setQwUserKey(qwUser.getId());
|
|
|
|
|
|
|
|
// 设置实际发送人
|
|
// 设置实际发送人
|
|
|
- updateQwUserKey(sopLogs,qwUser.getQwUserId(),param.getSopId(),groupUser.getChatId());
|
|
|
|
|
|
|
+ updateQwUserKey(sopLogs, qwUserId,param.getSopId(),groupUser.getChatId());
|
|
|
//域名
|
|
//域名
|
|
|
String companyUserId = qwUser.getCompanyUserId().toString();
|
|
String companyUserId = qwUser.getCompanyUserId().toString();
|
|
|
String companyId = String.valueOf(qwUser.getCompanyId()).trim();
|
|
String companyId = String.valueOf(qwUser.getCompanyId()).trim();
|
|
@@ -752,6 +754,50 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
break;
|
|
break;
|
|
|
case "16":
|
|
case "16":
|
|
|
createVoiceUrl(st, companyUserId, qwSop);
|
|
createVoiceUrl(st, companyUserId, qwSop);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "17": //h5看课
|
|
|
|
|
+ try {
|
|
|
|
|
+ addWatchLogIfNeeded(param.getSopId(), param.getVideoId(), param.getCourseId(), Long.valueOf(groupUser.getFsUserId()), qwUserId, companyUserId, companyId, groupUser.getId(), param.getStartTime(), createTime,2);
|
|
|
|
|
+
|
|
|
|
|
+ String sroth5link = createH5LinkByMiniApp(st, param.getCorpId(), createTime, param.getCourseId(), param.getVideoId(),
|
|
|
|
|
+ qwUserId, companyUserId, companyId, groupUser.getId(), config);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ miniAppId = null;
|
|
|
|
|
+ if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
|
|
|
|
|
+ Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
|
|
|
|
|
+ if (integerListMap != null) {
|
|
|
|
|
+ int listIndexTemp = 1;
|
|
|
|
|
+ List<CompanyMiniapp> miniapps = integerListMap.get(listIndexTemp);
|
|
|
|
|
+ if (miniapps != null && !miniapps.isEmpty()) {
|
|
|
|
|
+ CompanyMiniapp companyMiniapp = miniapps.get(0);
|
|
|
|
|
+ if (companyMiniapp != null && !StringUtil.strIsNullOrEmpty(companyMiniapp.getAppId())) {
|
|
|
|
|
+ miniAppId = companyMiniapp.getAppId();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
|
|
+ miniAppId = qwCompany.getMiniAppId();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
|
|
|
|
|
+ st.setMiniprogramAppid(miniAppId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ st.setMiniprogramTitle("邀请链接");
|
|
|
|
|
+ st.setMiniprogramPage(sroth5link);
|
|
|
|
|
+
|
|
|
|
|
+ st.setMiniprogramPicUrl(StringUtil.strIsNullOrEmpty(st.getMiniprogramPicUrl()) ? "https://cos.his.cdwjyyh.com/fs/20250331/ec2b4e73be8048afbd526124a655ad56.png" : st.getMiniprogramPicUrl());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("浏览器看课模板解析失败:" + e);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
@@ -1302,6 +1348,50 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
}
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "17":
|
|
|
|
|
+ try {
|
|
|
|
|
+ addWatchLogIfNeeded(item.getSopId(), param.getVideoId(), param.getCourseId(),item.getFsUserId(), qwUserId, companyUserId, companyId, item.getExternalId(),item.getStartTime(),createTime,2 );
|
|
|
|
|
+
|
|
|
|
|
+ String sroth5link = createH5LinkByMiniApp(st, param.getCorpId(), createTime, param.getCourseId(), param.getVideoId(),
|
|
|
|
|
+ qwUserId, companyUserId, companyId, item.getExternalId(), config);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ miniAppId = null;
|
|
|
|
|
+ if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
|
|
|
|
|
+ Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
|
|
|
|
|
+ if (integerListMap != null) {
|
|
|
|
|
+ int listIndexTemp = 1;
|
|
|
|
|
+ List<CompanyMiniapp> miniapps = integerListMap.get(listIndexTemp);
|
|
|
|
|
+ if (miniapps != null && !miniapps.isEmpty()) {
|
|
|
|
|
+ CompanyMiniapp companyMiniapp = miniapps.get(0);
|
|
|
|
|
+ if (companyMiniapp != null && !StringUtil.strIsNullOrEmpty(companyMiniapp.getAppId())) {
|
|
|
|
|
+ miniAppId = companyMiniapp.getAppId();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
|
|
+ miniAppId = qwCompany.getMiniAppId();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
|
|
|
|
|
+ st.setMiniprogramAppid(miniAppId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ st.setMiniprogramTitle("邀请链接");
|
|
|
|
|
+ st.setMiniprogramPage(sroth5link);
|
|
|
|
|
+
|
|
|
|
|
+ st.setMiniprogramPicUrl(StringUtil.strIsNullOrEmpty(st.getMiniprogramPicUrl()) ? "https://cos.his.cdwjyyh.com/fs/20250331/ec2b4e73be8048afbd526124a655ad56.png" : st.getMiniprogramPicUrl());
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("浏览器看课模板解析失败:" + e);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
@@ -1916,7 +2006,47 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
|
|
|
|
|
st.setMiniprogramPage(linkByMiniApp);
|
|
st.setMiniprogramPage(linkByMiniApp);
|
|
|
break;
|
|
break;
|
|
|
|
|
+ case "17": //h5看课
|
|
|
|
|
+ try {
|
|
|
|
|
+ addWatchLogIfNeeded(item.getSopId(), param.getVideoId(), param.getCourseId(), item.getFsUserId(), String.valueOf(qwUser.getId()), companyUserId, companyId,
|
|
|
|
|
+ item.getExternalId(), item.getStartTime(), dataTime,2);
|
|
|
|
|
+ String sroth5link = createH5LinkByMiniApp(st, param.getCorpId(), dataTime, param.getCourseId(), param.getVideoId(),
|
|
|
|
|
+ String.valueOf(qwUser.getId()), companyUserId, companyId, item.getExternalId(), config);
|
|
|
|
|
+
|
|
|
|
|
+ miniAppId = null;
|
|
|
|
|
+ if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
|
|
|
|
|
+ Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
|
|
|
|
|
+ if (integerListMap != null) {
|
|
|
|
|
+ int listIndexTemp = 1;
|
|
|
|
|
+ List<CompanyMiniapp> miniapps = integerListMap.get(listIndexTemp);
|
|
|
|
|
+ if (miniapps != null && !miniapps.isEmpty()) {
|
|
|
|
|
+ CompanyMiniapp companyMiniapp = miniapps.get(0);
|
|
|
|
|
+ if (companyMiniapp != null && !StringUtil.strIsNullOrEmpty(companyMiniapp.getAppId())) {
|
|
|
|
|
+ miniAppId = companyMiniapp.getAppId();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
|
|
+ miniAppId = qwCompany.getMiniAppId();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
|
|
|
|
|
+ st.setMiniprogramAppid(miniAppId);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
|
|
|
|
|
+ }
|
|
|
|
|
+ st.setMiniprogramTitle("邀请链接");
|
|
|
|
|
+ st.setMiniprogramPage(sroth5link);
|
|
|
|
|
+
|
|
|
|
|
+ st.setMiniprogramPicUrl(StringUtil.strIsNullOrEmpty(st.getMiniprogramPicUrl()) ? "https://cos.his.cdwjyyh.com/fs/20250331/ec2b4e73be8048afbd526124a655ad56.png" : st.getMiniprogramPicUrl());
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("浏览器看课模板解析失败:" + e);
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
default:
|
|
default:
|
|
|
break;
|
|
break;
|
|
|
|
|
|
|
@@ -2097,6 +2227,28 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
return link.getRealLink().replaceAll("^[\\s\\u2005]+", "");
|
|
return link.getRealLink().replaceAll("^[\\s\\u2005]+", "");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ String createH5LinkByMiniApp(QwSopCourseFinishTempSetting.Setting setting, String corpId, Date sendTime,
|
|
|
|
|
+ Integer courseId, Integer videoId, String qwUserId,
|
|
|
|
|
+ String companyUserId, String companyId, Long externalId, CourseConfig config) {
|
|
|
|
|
+
|
|
|
|
|
+ FsCourseLink link = createFsCourseLink(corpId, sendTime, courseId, videoId, Long.valueOf(qwUserId),
|
|
|
|
|
+ companyUserId, companyId, externalId, 3, null);
|
|
|
|
|
+
|
|
|
|
|
+ FsCourseRealLink courseMap = new FsCourseRealLink();
|
|
|
|
|
+ BeanUtils.copyProperties(link, courseMap);
|
|
|
|
|
+
|
|
|
|
|
+ String courseJson = JSON.toJSONString(courseMap);
|
|
|
|
|
+ String realLinkFull = h5miniappLink + courseJson;
|
|
|
|
|
+ link.setRealLink(realLinkFull);
|
|
|
|
|
+
|
|
|
|
|
+ Date updateTime = createUpdateTime(setting, sendTime, config);
|
|
|
|
|
+
|
|
|
|
|
+ link.setUpdateTime(updateTime);
|
|
|
|
|
+ //存短链-
|
|
|
|
|
+ fsCourseLinkMapper.insertFsCourseLink(link);
|
|
|
|
|
+ return link.getRealLink();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private QwCreateLinkByAppVO createLinkByApp(QwSopCourseFinishTempSetting.Setting setting, String corpId,
|
|
private QwCreateLinkByAppVO createLinkByApp(QwSopCourseFinishTempSetting.Setting setting, String corpId,
|
|
|
Date sendTime, Integer courseId, Integer videoId, Long qwUserId,
|
|
Date sendTime, Integer courseId, Integer videoId, Long qwUserId,
|
|
|
String companyUserId, String companyId, Long externalId,
|
|
String companyUserId, String companyId, Long externalId,
|