| 
														
															@@ -635,7 +635,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         insertSopUserLogs(sopUserLogsInfos, logVo, sendTime, ruleTimeVO, content, qwUserId, 
														 | 
														
														 | 
														
															                         insertSopUserLogs(sopUserLogsInfos, logVo, sendTime, ruleTimeVO, content, qwUserId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                 companyUserId, companyId, qwUserByRedis.getWelcomeText(),qwUserByRedis.getQwUserName(), 
														 | 
														
														 | 
														
															                                 companyUserId, companyId, qwUserByRedis.getWelcomeText(),qwUserByRedis.getQwUserName(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                                groupChatMap, miniAppId); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                groupChatMap, miniAppId,config); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } catch (Exception e) { 
														 | 
														
														 | 
														
															                 } catch (Exception e) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -678,7 +678,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private void insertSopUserLogs(List<SopUserLogsInfo> sopUserLogsInfos, SopUserLogsVo logVo, Date sendTime, 
														 | 
														
														 | 
														
															     private void insertSopUserLogs(List<SopUserLogsInfo> sopUserLogsInfos, SopUserLogsVo logVo, Date sendTime, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                    QwSopRuleTimeVO ruleTimeVO, QwSopTempSetting.Content content, 
														 | 
														
														 | 
														
															                                    QwSopRuleTimeVO ruleTimeVO, QwSopTempSetting.Content content, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                    String qwUserId,String companyUserId,String companyId,String welcomeText,String qwUserName, 
														 | 
														
														 | 
														
															                                    String qwUserId,String companyUserId,String companyId,String welcomeText,String qwUserName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                                   Map<String, QwGroupChat> groupChatMap,String miniAppId) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                   Map<String, QwGroupChat> groupChatMap,String miniAppId,CourseConfig config) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         String formattedSendTime = sendTime.toInstant() 
														 | 
														
														 | 
														
															         String formattedSendTime = sendTime.toInstant() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 .atZone(ZoneId.systemDefault()) 
														 | 
														
														 | 
														
															                 .atZone(ZoneId.systemDefault()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 .format(DATE_TIME_FORMATTER); 
														 | 
														
														 | 
														
															                 .format(DATE_TIME_FORMATTER); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -704,7 +704,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (content.getIndex() == 0) { 
														 | 
														
														 | 
														
															             if (content.getIndex() == 0) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, groupChat.getChatId(), groupChat.getName(), null, isOfficial, null); 
														 | 
														
														 | 
														
															                 QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, groupChat.getChatId(), groupChat.getName(), null, isOfficial, null); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
														
														 | 
														
															                 handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        type, qwUserId, companyUserId, companyId, groupChat.getChatId(), welcomeText, qwUserName, null, true, miniAppId, groupChat); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        type, qwUserId, companyUserId, companyId, groupChat.getChatId(), welcomeText, qwUserName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        null, true, miniAppId, groupChat,config); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } else { 
														 | 
														
														 | 
														
															             } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 if(groupChat.getChatUserList() != null && !groupChat.getChatUserList().isEmpty()){ 
														 | 
														
														 | 
														
															                 if(groupChat.getChatUserList() != null && !groupChat.getChatUserList().isEmpty()){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     groupChat.getChatUserList().forEach(user -> { 
														 | 
														
														 | 
														
															                     groupChat.getChatUserList().forEach(user -> { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -712,7 +713,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         ruleTimeVO.setRemark("客户群催课"); 
														 | 
														
														 | 
														
															                         ruleTimeVO.setRemark("客户群催课"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, user.getUserId(), user.getName(), null, isOfficial, null); 
														 | 
														
														 | 
														
															                         QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, user.getUserId(), user.getName(), null, isOfficial, null); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
														
														 | 
														
															                         handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                                type, qwUserId, companyUserId, companyId, user.getId().toString(), welcomeText, qwUserName, null, false, miniAppId, groupChat); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                type, qwUserId, companyUserId, companyId, user.getId().toString(), welcomeText, qwUserName, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                null, false, miniAppId, groupChat,config); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     }); 
														 | 
														
														 | 
														
															                     }); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -725,7 +727,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     Long fsUserId = contactId.getFsUserId(); 
														 | 
														
														 | 
														
															                     Long fsUserId = contactId.getFsUserId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, contactId.getExternalContactId(), externalUserName, fsUserId, isOfficial, contactId.getExternalId()); 
														 | 
														
														 | 
														
															                     QwSopLogs sopLogs = createBaseLog(formattedSendTime, logVo, ruleTimeVO, contactId.getExternalContactId(), externalUserName, fsUserId, isOfficial, contactId.getExternalId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
														
														 | 
														
															                     handleLogBasedOnType(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                            type, qwUserId, companyUserId, companyId, externalId, welcomeText, qwUserName, fsUserId, false, miniAppId, null); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            type, qwUserId, companyUserId, companyId, externalId, welcomeText, qwUserName, fsUserId, false, miniAppId, null,config); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } catch (Exception e) { 
														 | 
														
														 | 
														
															                 } catch (Exception e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     log.error("处理 externalContactId {} 时发生异常: {}", contactId, e.getMessage(), e); 
														 | 
														
														 | 
														
															                     log.error("处理 externalContactId {} 时发生异常: {}", contactId, e.getMessage(), e); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -833,14 +835,16 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                       SopUserLogsVo logVo, Date sendTime, Long courseId, 
														 | 
														
														 | 
														
															                                       SopUserLogsVo logVo, Date sendTime, Long courseId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                       Long videoId, int type, String qwUserId, 
														 | 
														
														 | 
														
															                                       Long videoId, int type, String qwUserId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                       String companyUserId, String companyId, String externalId, String welcomeText, 
														 | 
														
														 | 
														
															                                       String companyUserId, String companyId, String externalId, String welcomeText, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                                      String qwUserName, Long fsUserId, boolean isGroupChat, String miniAppId, QwGroupChat groupChat) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                      String qwUserName, Long fsUserId, boolean isGroupChat, String miniAppId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                      QwGroupChat groupChat,CourseConfig config) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         switch (type) { 
														 | 
														
														 | 
														
															         switch (type) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             case 1: 
														 | 
														
														 | 
														
															             case 1: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 handleNormalMessage(sopLogs, content,companyUserId); 
														 | 
														
														 | 
														
															                 handleNormalMessage(sopLogs, content,companyUserId); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 break; 
														 | 
														
														 | 
														
															                 break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             case 2: 
														 | 
														
														 | 
														
															             case 2: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 handleCourseMessage(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
														
														 | 
														
															                 handleCourseMessage(sopLogs, content, logVo, sendTime, courseId, videoId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        qwUserId, companyUserId, companyId, externalId, welcomeText,qwUserName, fsUserId, isGroupChat, miniAppId, groupChat); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        qwUserId, companyUserId, companyId, externalId, welcomeText,qwUserName, fsUserId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        isGroupChat, miniAppId, groupChat,config); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 break; 
														 | 
														
														 | 
														
															                 break; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             case 3: 
														 | 
														
														 | 
														
															             case 3: 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 handleOrderMessage(sopLogs, content); 
														 | 
														
														 | 
														
															                 handleOrderMessage(sopLogs, content); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -873,7 +877,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                      SopUserLogsVo logVo, Date sendTime, Long courseId, 
														 | 
														
														 | 
														
															                                      SopUserLogsVo logVo, Date sendTime, Long courseId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                                      Long videoId, String qwUserId, String companyUserId, 
														 | 
														
														 | 
														
															                                      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) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                     Long fsUserId, boolean isGroupChat, String miniAppId, QwGroupChat groupChat,CourseConfig config) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         // 深拷贝 Content 对象,避免使用 JSON 
														 | 
														
														 | 
														
															         // 深拷贝 Content 对象,避免使用 JSON 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         QwSopTempSetting.Content clonedContent = deepCopyContent(content); 
														 | 
														
														 | 
														
															         QwSopTempSetting.Content clonedContent = deepCopyContent(content); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (clonedContent == null) { 
														 | 
														
														 | 
														
															         if (clonedContent == null) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -974,7 +978,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     setting.setMiniprogramPage(sortLink.replaceAll("^[\\s\\u2005]+", "")); 
														 | 
														
														 | 
														
															                     setting.setMiniprogramPage(sortLink.replaceAll("^[\\s\\u2005]+", "")); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     try { 
														 | 
														
														 | 
														
															                     try { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        setting.setMiniprogramPicUrl(StringUtil.strIsNullOrEmpty(setting.getMiniprogramPicUrl())?"https://cos.his.cdwjyyh.com/fs/20250331/ec2b4e73be8048afbd526124a655ad56.png":setting.getMiniprogramPicUrl()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        setting.setMiniprogramPicUrl(StringUtil.strIsNullOrEmpty(setting.getMiniprogramPicUrl())? config.getSidebarImageUrl():setting.getMiniprogramPicUrl()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } catch (Exception e) { 
														 | 
														
														 | 
														
															                     } catch (Exception e) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         log.error("赋值-小程序封面地址失败-" + e); 
														 | 
														
														 | 
														
															                         log.error("赋值-小程序封面地址失败-" + e); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1241,6 +1245,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             log.error("CourseConfig is not loaded."); 
														 | 
														
														 | 
														
															             log.error("CourseConfig is not loaded."); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             return ""; 
														 | 
														
														 | 
														
															             return ""; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //        if (StringUtils.isEmpty(config.getMiniprogramPage())){ 
														 | 
														
														 | 
														
															 //        if (StringUtils.isEmpty(config.getMiniprogramPage())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //            log.error("miniprogramPage is not loaded."); 
														 | 
														
														 | 
														
															 //            log.error("miniprogramPage is not loaded."); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //            return ""; 
														 | 
														
														 | 
														
															 //            return ""; 
														 |