From eb3ddabea3d5a11c57fc793ba56b4da31e5546af Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期五, 01 九月 2023 16:43:08 +0800 Subject: [PATCH] 修改杨家坪社区问题 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java | 43 +++++++++++++++++++++++++++++++++---------- 1 files changed, 33 insertions(+), 10 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 19302b7..68fdd46 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 @@ -98,7 +98,7 @@ Boolean isExpertCheck=false; Long expertId=null; Boolean isStretAccount = isStreetAccount(loginUserInfoVO); -// comEvent.setAppId(loginUserInfoVO.getAppId()); + comEvent.setAppId(loginUserInfoVO.getAppId()); if (nonNull(comEvent.getUserType())){ if (comEvent.getUserType().equals(1)){ //个人账号权限 @@ -146,8 +146,9 @@ IPage<ComEvent> list=null; //是否为专家查看自己发布的事件 if (isExpertCheck && comEvent.getUserType()!=1){ - if (nonNull(comEventMapper.listEventIds(expertId))){ - list = comEventMapper.pageByComEventExpert(comEventMapper.listEventIds(expertId), comEvent, pagination); + List<Long> ids=comEventMapper.listEventIds(expertId); + if (ids!=null && ids.size()>0 ){ + list = comEventMapper.pageByComEventExpert(ids, comEvent, pagination); } }else{ list = baseMapper.pageByComEvent(comEvent, pagination); @@ -927,15 +928,37 @@ return map; } - public String getPhone(ComEvent comEvent){ + public String getPhone(ComEvent comEvent) + { + if(comEvent==null) + { + return ""; + } if (isNull(comEvent.getRequestUserCommunity())){ - return comSanShuoIndustryCenterService.getById(comEvent.getCenterId()).getPhone(); - }else { - String contactsPhone = comActDAO.selectById(comEvent.getRequestUserCommunity()).getContactsPhone(); - if (isNull(contactsPhone)){ - return null; + ComSanshuoIndustryCenter sanshuoIndustryCenter=comSanShuoIndustryCenterService.getById(comEvent.getCenterId()); + if(sanshuoIndustryCenter==null) + { + return ""; } - return contactsPhone; + else + { + return sanshuoIndustryCenter.getPhone(); + } + + }else { + ComActDO comActDO=comActDAO.selectById(comEvent.getRequestUserCommunity()); + if(comActDO!=null) + { + String contactsPhone = comActDO.getContactsPhone(); + if (isNull(contactsPhone)){ + return ""; + } + else + { + return contactsPhone; + } + } + return ""; } } -- Gitblit v1.7.1