| | |
| | | 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); |
| | | } |
| | | if (list.getRecords().size() < 1) { |
| | | if (list==null || list.getRecords().size() < 1) { |
| | | return R.ok(Collections.emptyList()); |
| | | } |
| | | list.getRecords().forEach(comEvent1 -> { |
| | |
| | | comEvent.setCommunityIds(cids); |
| | | } |
| | | if (isExpertCheck){ |
| | | if(nonNull(comEventMapper.listEventIds(expertId))){ |
| | | List<Long> eventIds = comEventMapper.listEventIds(expertId); |
| | | List<Long> eventIds = comEventMapper.listEventIds(expertId); |
| | | if(eventIds!=null && eventIds.size()>0){ |
| | | |
| | | //获取该专家的所有事件 |
| | | comEvent.setEventIds(eventIds); |
| | | } |