From 08d38fab4e81e780a5edef7ca02d66b1dc29991c Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期一, 24 十月 2022 14:11:14 +0800
Subject: [PATCH] Merge branch 'local_20221024' into huacheng_test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
index 2d9456d..c88bb91 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -617,7 +617,7 @@
             comEvent.setCurrentOrgId(community.getCommunityId().toString());
             comEvent.setCurrentProcessType(5);
         }
-        if (!StringUtils.isEmpty(comEvent.getCenterId())) {
+        if (!StringUtils.isEmpty(comEvent.getCenterId()))   {
             //创建时处理级别都是专家
             ComSanshuoIndustryCenter center = comSanShuoIndustryCenterService.getById(comEvent.getCenterId());
             comEvent.setCurrentOrgName(center.getName());
@@ -653,11 +653,10 @@
         return R.ok(ReturnMsgConstants.SAVE_SUCCESS);
     }
 
-
     public void sendMessage(Long expertId,ComEvent comEvent){
         //获取专家的openId
         ComSanshuoExpert expert = comSanShuoExpertService.getById(expertId);
-        SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1));
+        SysUser sysUser = sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getPhone, expert.getPhone()).eq(SysUser::getType, 1).eq(SysUser::getAppId,"wx0cef797390444b75" ));
         SanShuoMessageVO vo=new SanShuoMessageVO();
         if (nonNull(sysUser)){
             if (isNull(sysUser.getOpenid())){
@@ -899,10 +898,21 @@
         List<ComEventResource> resource = comEventResourceService.list(new QueryWrapper<ComEventResource>().lambda().eq(ComEventResource::getRefId, id)
                 .eq(ComEventResource::getStatus, 5));
         map.put("archiveImage", resource);
-        map.put("contact", comActDAO.selectById(comEvent.getRequestUserCommunity()).getContactsPhone());
+        map.put("contact", getPhone(comEvent));
         return map;
     }
 
+    public String getPhone(ComEvent comEvent){
+        if (isNull(comEvent.getRequestUserCommunity())){
+            return comSanShuoIndustryCenterService.getById(comEvent.getCenterId()).getPhone();
+        }else {
+            String contactsPhone = comActDAO.selectById(comEvent.getRequestUserCommunity()).getContactsPhone();
+            if (isNull(contactsPhone)){
+                return null;
+            }
+            return contactsPhone;
+        }
+    }
 
     @Override
     @Transactional(rollbackFor = Exception.class)

--
Gitblit v1.7.1