|
@@ -839,10 +839,11 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
String linkByMiniApp = createLinkByMiniApp(st, param.getCorpId(), createTime, param.getCourseId(), param.getVideoId(),
|
|
|
qwUserId, companyUserId, companyId, item.getExternalId(), config);
|
|
|
|
|
|
+ String miniAppId = null;
|
|
|
+
|
|
|
if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
|
|
|
Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
|
|
|
if (integerListMap != null) {
|
|
|
-
|
|
|
int effectiveGrade = (item.getGrade() == null) ? 5 : item.getGrade();
|
|
|
int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
|
|
|
List<CompanyMiniapp> miniapps = integerListMap.get(listIndex);
|
|
@@ -850,18 +851,18 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
if (miniapps != null && !miniapps.isEmpty()) {
|
|
|
CompanyMiniapp companyMiniapp = miniapps.get(0);
|
|
|
if (companyMiniapp != null && !StringUtil.strIsNullOrEmpty(companyMiniapp.getAppId())) {
|
|
|
- st.setMiniprogramAppid(companyMiniapp.getAppId());
|
|
|
- }else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())){
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
+ miniAppId = companyMiniapp.getAppId();
|
|
|
}
|
|
|
- }else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())){
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
}
|
|
|
- }else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())){
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
}
|
|
|
- } else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
+ miniAppId = qwCompany.getMiniAppId();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
|
|
|
+ st.setMiniprogramAppid(miniAppId);
|
|
|
} else {
|
|
|
log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
|
|
|
}
|
|
@@ -1213,10 +1214,12 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
String linkByMiniApp = createLinkByMiniApp(st, param.getCorpId(), dataTime, param.getCourseId(), param.getVideoId(),
|
|
|
String.valueOf(qwUser.getId()), companyUserId, companyId, item.getExternalId(), config);
|
|
|
|
|
|
+
|
|
|
+ String miniAppId = null;
|
|
|
+
|
|
|
if (!miniMap.isEmpty() && qwUser.getSendMsgType() == 1) {
|
|
|
Map<Integer, List<CompanyMiniapp>> integerListMap = miniMap.get(Long.valueOf(companyId));
|
|
|
if (integerListMap != null) {
|
|
|
-
|
|
|
int effectiveGrade = (item.getGrade() == null) ? 5 : item.getGrade();
|
|
|
int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
|
|
|
List<CompanyMiniapp> miniapps = integerListMap.get(listIndex);
|
|
@@ -1224,22 +1227,23 @@ public class SopUserLogsInfoServiceImpl implements ISopUserLogsInfoService {
|
|
|
if (miniapps != null && !miniapps.isEmpty()) {
|
|
|
CompanyMiniapp companyMiniapp = miniapps.get(0);
|
|
|
if (companyMiniapp != null && !StringUtil.strIsNullOrEmpty(companyMiniapp.getAppId())) {
|
|
|
- st.setMiniprogramAppid(companyMiniapp.getAppId());
|
|
|
- }else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())){
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
+ miniAppId = companyMiniapp.getAppId();
|
|
|
}
|
|
|
- }else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())){
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
}
|
|
|
- }else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())){
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
}
|
|
|
- } else if (!StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
- st.setMiniprogramAppid(qwCompany.getMiniAppId());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtil.strIsNullOrEmpty(miniAppId) && !StringUtil.strIsNullOrEmpty(qwCompany.getMiniAppId())) {
|
|
|
+ miniAppId = qwCompany.getMiniAppId();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!StringUtil.strIsNullOrEmpty(miniAppId)) {
|
|
|
+ st.setMiniprogramAppid(miniAppId);
|
|
|
} else {
|
|
|
- log.error("公司的小程序id为空:采用了前端传的固定值" + param.getCorpId());
|
|
|
+ log.error("企业未配置小程序" + param.getCorpId());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
st.setMiniprogramPage(linkByMiniApp);
|
|
|
break;
|
|
|
default:
|