diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java index a98abf7..a2dd01b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java @@ -18,4 +18,10 @@ public interface ExpertAdminManageMapper { * @return */ List listExpertUserId(@Param("query") ListExpertQuery query); + + List listExpertDictionaryUserId(@Param("query") ListExpertQuery query); + + List listExpertTagUserId(@Param("query") ListExpertQuery query); + + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml index 425f052..5e7aefa 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml @@ -103,14 +103,24 @@ + + + + diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java index cd10d39..842aa36 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java @@ -13,6 +13,8 @@ import com.ningdatech.pmapi.expert.entity.ExpertUserFullInfo; import com.ningdatech.pmapi.expert.mapper.ExpertAdminManageMapper; import com.ningdatech.pmapi.expert.model.cmd.ExpertAdminExpertManageQueryCmd; import com.ningdatech.pmapi.expert.model.dto.ExpertAdminExpertManageListDTO; +import com.ningdatech.pmapi.expert.model.query.ExpertDictionaryQuery; +import com.ningdatech.pmapi.expert.model.query.ExpertTagQuery; import com.ningdatech.pmapi.expert.model.query.ListExpertQuery; import com.ningdatech.pmapi.expert.service.ExpertAdminManageService; import com.ningdatech.pmapi.expert.service.IExpertUserFullInfoService; @@ -42,11 +44,28 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { private final IExpertTagService iExpertTagService; private final ExpertAdminManageMapper expertAdminManageMapper; + private List listExpertUserId(ListExpertQuery listExpertQuery) { + List userIdList = expertAdminManageMapper.listExpertUserId(listExpertQuery); + + List expertTagQueryList = listExpertQuery.getExpertTagQueryList(); + if (CollectionUtils.isNotEmpty(expertTagQueryList)) { + List tagUserIdList = expertAdminManageMapper.listExpertTagUserId(listExpertQuery); + userIdList.retainAll(tagUserIdList); + } + + List expertDictionaryQueryList = listExpertQuery.getExpertDictionaryQueryList(); + if (CollectionUtils.isNotEmpty(expertDictionaryQueryList)) { + List dictionaryUserIdList = expertAdminManageMapper.listExpertDictionaryUserId(listExpertQuery); + userIdList.retainAll(dictionaryUserIdList); + } + return userIdList; + } + @Override public CommonPage getExpertLibraryList(ExpertAdminExpertManageQueryCmd req) { ListExpertQuery listExpertQuery = buildListExpertQuery(req); - List userIdList = expertAdminManageMapper.listExpertUserId(listExpertQuery); + List userIdList = listExpertUserId(listExpertQuery); List evidenceHasBeenSubmittedExpertInfoList = iExpertUserFullInfoService.list(Wrappers.lambdaQuery(ExpertUserFullInfo.class) .eq(ExpertUserFullInfo::getUserInfoStep, ExpertUserInfoStepEnum.EVIDENCE_HAS_BEEN_SUBMITTED.getKey())); @@ -113,6 +132,6 @@ public class ExpertAdminManageServiceImpl implements ExpertAdminManageService { @Override public List filterExpertUserIdList(ExpertAdminExpertManageQueryCmd queryCmd) { ListExpertQuery listExpertQuery = buildListExpertQuery(queryCmd); - return expertAdminManageMapper.listExpertUserId(listExpertQuery); + return listExpertUserId(listExpertQuery); } }