liujie
2025-10-13 5e120585b61ae126163cb0d676cf452c8a21822f
ruoyi-system/src/main/java/com/ruoyi/system/listener/PublishTopicLiveInfoEventListener.java
@@ -2,6 +2,7 @@
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.listener.event.PublishTopicLiveInfoEvent;
import com.ruoyi.system.model.TCrmClinic;
import com.ruoyi.system.model.TCrmSalesperson;
@@ -67,7 +68,9 @@
                    List<Long> userIds = clinicList.stream().map(TCrmClinic::getUserId).collect(Collectors.toList());
                    List<SysUser> sysUserList = sysUserService.selectUserListByIds(userIds);
                    for (SysUser user : sysUserList) {
                        templateMessageSendUtil.wxOfficeTemplateAppLiveRequest(user.getOpenId(),liveTitle,liveStartTime);
                        if(StringUtils.isNotEmpty(user.getOpenId())){
                            templateMessageSendUtil.wxOfficeTemplateAppLiveRequest(user.getOpenId(),liveTitle,liveStartTime);
                        }
                    }
                }
            }
@@ -75,7 +78,9 @@
                // 用户
                List<TSysAppUser> sysAppUsers = sysAppUserService.list();
                for (TSysAppUser sysAppUser : sysAppUsers) {
                    templateMessageSendUtil.wxOfficeTemplateAppLiveRequest(sysAppUser.getOfficeOpenId(),liveTitle,liveStartTime);
                    if(StringUtils.isNotEmpty(sysAppUser.getOfficeOpenId())){
                        templateMessageSendUtil.wxOfficeTemplateAppLiveRequest(sysAppUser.getOfficeOpenId(),liveTitle,liveStartTime);
                    }
                }
            }
            if(pushType.contains("3")){
@@ -85,7 +90,9 @@
                    List<Long> userIds = crmSalespeopleList.stream().map(TCrmSalesperson::getUserId).collect(Collectors.toList());
                    List<SysUser> sysUserList = sysUserService.selectUserListByIds(userIds);
                    for (SysUser user : sysUserList) {
                        templateMessageSendUtil.wxOfficeTemplateAppLiveRequest(user.getOpenId(),liveTitle,liveStartTime);
                        if(StringUtils.isNotEmpty(user.getOpenId())){
                            templateMessageSendUtil.wxOfficeTemplateAppLiveRequest(user.getOpenId(),liveTitle,liveStartTime);
                        }
                    }
                }
            }