|
@@ -363,7 +363,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
|
|
|
|
|
|
|
private void processSopGroup(String sopId, List<SopUserLogsVo> userLogsVos,LocalDateTime currentTime, Map<String,
|
|
private void processSopGroup(String sopId, List<SopUserLogsVo> userLogsVos,LocalDateTime currentTime, Map<String,
|
|
- QwGroupChat> groupChatMap,CourseConfig config,Map<Long, Map<Integer, List<CompanyMiniapp>>> miniMap,
|
|
|
|
|
|
+ QwGroupChat> groupChatMap,CourseConfig config,Map<Long, Map<Integer, List<CompanyMiniapp>>> miniMap,
|
|
List<Company> companies) throws Exception {
|
|
List<Company> companies) throws Exception {
|
|
QwSopRuleTimeVO ruleTimeVO = sopMapper.selectQwSopByClickHouseId(sopId);
|
|
QwSopRuleTimeVO ruleTimeVO = sopMapper.selectQwSopByClickHouseId(sopId);
|
|
|
|
|
|
@@ -857,7 +857,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
SopUserLogsVo logVo, Date sendTime, Long courseId, Long videoId, String qwUserId, String companyUserId,
|
|
SopUserLogsVo logVo, Date sendTime, Long courseId, Long videoId, String qwUserId, String companyUserId,
|
|
String companyId, String externalId, String welcomeText, String qwUserName,
|
|
String companyId, String externalId, String welcomeText, String qwUserName,
|
|
Long fsUserId, boolean isGroupChat, String miniAppId, QwGroupChat groupChat,CourseConfig config,Map<Long,
|
|
Long fsUserId, boolean isGroupChat, String miniAppId, QwGroupChat groupChat,CourseConfig config,Map<Long,
|
|
- Map<Integer, List<CompanyMiniapp>>> miniMap,Integer grade, Integer sendMsgType,
|
|
|
|
|
|
+ Map<Integer, List<CompanyMiniapp>>> miniMap,Integer grade, Integer sendMsgType,
|
|
List<Company> companies) {
|
|
List<Company> companies) {
|
|
// 深拷贝 Content 对象,避免使用 JSON
|
|
// 深拷贝 Content 对象,避免使用 JSON
|
|
QwSopTempSetting.Content clonedContent = deepCopyContent(content);
|
|
QwSopTempSetting.Content clonedContent = deepCopyContent(content);
|
|
@@ -953,6 +953,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
if(sopLogs.getSendType()==1){
|
|
if(sopLogs.getSendType()==1){
|
|
setting.setMiniprogramAppid(miniAppId);
|
|
setting.setMiniprogramAppid(miniAppId);
|
|
}else {
|
|
}else {
|
|
|
|
+ int miniType = getLevel(grade);
|
|
//算主备小程序
|
|
//算主备小程序
|
|
String finalAppId = getAppIdFromMiniMap(miniMap, companyId, sendMsgType, grade);
|
|
String finalAppId = getAppIdFromMiniMap(miniMap, companyId, sendMsgType, grade);
|
|
|
|
|
|
@@ -960,6 +961,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
finalAppId = miniAppId;
|
|
finalAppId = miniAppId;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ setting.setMiniType(miniType);
|
|
if (!StringUtil.strIsNullOrEmpty(finalAppId)) {
|
|
if (!StringUtil.strIsNullOrEmpty(finalAppId)) {
|
|
setting.setMiniprogramAppid(finalAppId);
|
|
setting.setMiniprogramAppid(finalAppId);
|
|
} else {
|
|
} else {
|
|
@@ -1032,8 +1034,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
- int effectiveGrade = (grade == null) ? 5 : grade;
|
|
|
|
- int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
|
|
|
|
|
|
+ int listIndex = getLevel(grade);
|
|
List<CompanyMiniapp> miniapps = gradeMap.get(listIndex);
|
|
List<CompanyMiniapp> miniapps = gradeMap.get(listIndex);
|
|
|
|
|
|
if (miniapps == null || miniapps.isEmpty()) {
|
|
if (miniapps == null || miniapps.isEmpty()) {
|
|
@@ -1046,6 +1047,12 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
: null;
|
|
: null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private static int getLevel(Integer grade) {
|
|
|
|
+ int effectiveGrade = (grade == null) ? 5 : grade;
|
|
|
|
+ int listIndex = (effectiveGrade == 1 || effectiveGrade == 2) ? 0 : 1;
|
|
|
|
+ return listIndex;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 深拷贝 Content 对象,避免使用 JSON 进行序列化和反序列化
|
|
* 深拷贝 Content 对象,避免使用 JSON 进行序列化和反序列化
|
|
*/
|
|
*/
|
|
@@ -1209,9 +1216,9 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
|
|
|
|
|
|
|
public FsCourseSopAppLink createFsCourseSopAppLink(String link, Date sendTime, Date updateTime, String companyId,
|
|
public FsCourseSopAppLink createFsCourseSopAppLink(String link, Date sendTime, Date updateTime, String companyId,
|
|
- String companyUserId,String qwUserId,String qwUserName,String corpId,
|
|
|
|
- Long courseId,String linkTile,String linkImageUrl,Long videoId,
|
|
|
|
- String linkDescribe,String appMsgLink,String externalId){
|
|
|
|
|
|
+ String companyUserId,String qwUserId,String qwUserName,String corpId,
|
|
|
|
+ Long courseId,String linkTile,String linkImageUrl,Long videoId,
|
|
|
|
+ String linkDescribe,String appMsgLink,String externalId){
|
|
|
|
|
|
FsCourseSopAppLink sopAppLink=new FsCourseSopAppLink();
|
|
FsCourseSopAppLink sopAppLink=new FsCourseSopAppLink();
|
|
sopAppLink.setLink(link);
|
|
sopAppLink.setLink(link);
|
|
@@ -1275,8 +1282,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
}
|
|
}
|
|
|
|
|
|
private String createLinkByMiniApp(QwSopTempSetting.Content.Setting setting, SopUserLogsVo logVo, Date sendTime,
|
|
private String createLinkByMiniApp(QwSopTempSetting.Content.Setting setting, SopUserLogsVo logVo, Date sendTime,
|
|
- Long courseId, Long videoId, String qwUserId,
|
|
|
|
- String companyUserId, String companyId, String externalId,String isOfficial,Long fsUserId) {
|
|
|
|
|
|
+ Long courseId, Long videoId, String qwUserId,
|
|
|
|
+ String companyUserId, String companyId, String externalId,String isOfficial,Long fsUserId) {
|
|
// 获取缓存的配置
|
|
// 获取缓存的配置
|
|
CourseConfig config;
|
|
CourseConfig config;
|
|
synchronized(configLock) {
|
|
synchronized(configLock) {
|