From f85672cc0fe270b545fc1c8f48b8cd7054aa5aaf Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 17 Mar 2023 14:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BC=9A=E8=AE=AE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/meeting/helper/MeetingManageHelper.java | 15 +++++++-------- .../ningdatech/pmapi/meeting/manage/MeetingManage.java | 9 ++++++++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java index 2953f4b..af17437 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/helper/MeetingManageHelper.java @@ -10,6 +10,9 @@ import com.ningdatech.pmapi.common.util.BizUtils; import com.ningdatech.pmapi.common.util.StrUtils; import com.ningdatech.pmapi.expert.constant.ExpertAccountStatusEnum; import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; +import com.ningdatech.pmapi.expert.model.dto.ExpertDictionaryDTO; +import com.ningdatech.pmapi.expert.model.dto.ExpertFullInfoAllDTO; +import com.ningdatech.pmapi.expert.model.dto.ExpertUserFullInfoDTO; import com.ningdatech.pmapi.expert.service.ExpertInfoService; import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; import com.ningdatech.pmapi.meeting.entity.domain.ExpertInviteAvoidRule; @@ -26,16 +29,14 @@ import com.ningdatech.pmapi.meeting.entity.vo.MeetingByManagerVO; import com.ningdatech.pmapi.meeting.service.IExpertInviteAvoidRuleService; import com.ningdatech.pmapi.meeting.service.IExpertInviteRuleService; import com.ningdatech.pmapi.meeting.service.IMeetingExpertService; +import com.ningdatech.pmapi.meta.constant.DictExpertInfoTypeEnum; import com.ningdatech.pmapi.meta.helper.DictionaryCache; import com.ningdatech.pmapi.meta.model.dto.DictionaryDTO; import lombok.AllArgsConstructor; import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Component; -import java.util.Collection; -import java.util.Comparator; -import java.util.List; -import java.util.Map; +import java.util.*; /** *

@@ -152,7 +153,7 @@ public class MeetingManageHelper { * @author WendyYang **/ public Map getExpertBasicInfo(List userIds) { - /*List expertInfos = expertInfoService.listExpertUserFullInfoAll(userIds); + List expertInfos = expertInfoService.listExpertUserFullInfoAll(userIds); return CollUtils.listToMap(expertInfos, ExpertFullInfoAllDTO::getUserId, w -> { ExpertBasicInfoVO basicInfoVo = new ExpertBasicInfoVO(); ExpertUserFullInfoDTO userInfo = w.getExpertUserInfoDTO(); @@ -171,9 +172,7 @@ public class MeetingManageHelper { } basicInfoVo.setCompanyType(""); return basicInfoVo; - });*/ - // TODO - return null; + }); } public AvoidRuleDTO getAvoidInfoDto(Long meetingId) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java index 7455044..c7be3d9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/MeetingManage.java @@ -14,6 +14,7 @@ import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.model.IdVo; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; +import com.ningdatech.basic.util.StrPool; import com.ningdatech.basic.util.ValidUtil; import com.ningdatech.cache.lock.DistributedLock; import com.ningdatech.pmapi.common.helper.RegionCacheHelper; @@ -90,6 +91,12 @@ public class MeetingManage { private static final String MEETING_CREATE_KEY = "MEETING_CREATE:"; + private String getDictName(String dictType){ + return Optional.ofNullable(dictionaryCache.getByCode(dictType)) + .flatMap(w -> Optional.of(w.getName())) + .orElse(StrPool.EMPTY); + } + /** * 锁定时间10 * 60秒 */ @@ -351,7 +358,7 @@ public class MeetingManage { .meetingName(meeting.getName()) .meetingType(meeting.getType()) .meetingAddress(meeting.getMeetingAddress()) - .typeName(dictionaryCache.getByCode(meeting.getType()).getName()) + .typeName(getDictName(meeting.getType())) .startTime(meeting.getStartTime()) .judgesAttendanceTime(meeting.getJudgesAttendanceTime()) .meetingUsageTime(meeting.getMeetingUsageTime())