Bladeren bron

Merge remote-tracking branch 'origin/master'

master
PoffyZhang 1 jaar geleden
bovenliggende
commit
3245b11064
4 gewijzigde bestanden met toevoegingen van 51 en 10 verwijderingen
  1. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertAdminExpertManageAssembler.java
  2. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java
  3. +18
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml
  4. +21
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/assembler/ExpertAdminExpertManageAssembler.java Bestand weergeven

@@ -103,6 +103,9 @@ public class ExpertAdminExpertManageAssembler {
}

public List<DictionaryFieldInfo> assembleDictionaryName(List<DictionaryFieldInfo> collect) {
if (CollectionUtil.isEmpty(collect)){
return new ArrayList<>();
}
return collect.stream().peek(r -> {
DictionaryDTO dictionaryDTO = dictionaryCache.getByCode(r.getDictionaryCode());
if (Objects.nonNull(dictionaryDTO)) {
@@ -113,6 +116,9 @@ public class ExpertAdminExpertManageAssembler {


public List<TagFieldInfo> assembleTagName(List<TagFieldInfo> collect) {
if (CollectionUtil.isEmpty(collect)){
return new ArrayList<>();
}
return collect.stream().peek(r -> {
TagDTO tagDTO = tagCache.getByTagCode(r.getTagCode());
if (Objects.nonNull(tagDTO)) {


+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java Bestand weergeven

@@ -18,4 +18,10 @@ public interface ExpertAdminManageMapper {
* @return
*/
List<Long> listExpertUserId(@Param("query") ListExpertQuery query);

List<Long> listExpertDictionaryUserId(@Param("query") ListExpertQuery query);

List<Long> listExpertTagUserId(@Param("query") ListExpertQuery query);


}

+ 18
- 8
pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml Bestand weergeven

@@ -103,14 +103,24 @@
<select id="listExpertUserId" resultType="java.lang.Long"
parameterType="com.ningdatech.pmapi.expert.model.query.ListExpertQuery">
<include refid="Expert_Full_Info_Region"/>
<if test="query.expertTagQueryList != null and query.expertTagQueryList.size >0 ">
INTERSECT
<include refid="Expert_Tag_Relation"/>
</if>
<if test="query.expertDictionaryQueryList != null and query.expertDictionaryQueryList.size >0 ">
INTERSECT
<include refid="Expert_Dictionary_Relation"/>
</if>
<!-- <if test="query.expertTagQueryList != null and query.expertTagQueryList.size >0 ">-->
<!-- INTERSECT-->
<!-- <include refid="Expert_Tag_Relation"/>-->
<!-- </if>-->
<!-- <if test="query.expertDictionaryQueryList != null and query.expertDictionaryQueryList.size >0 ">-->
<!-- INTERSECT-->
<!-- <include refid="Expert_Dictionary_Relation"/>-->
<!-- </if>-->
</select>

<select id="listExpertDictionaryUserId" resultType="java.lang.Long"
parameterType="com.ningdatech.pmapi.expert.model.query.ListExpertQuery">
<include refid="Expert_Dictionary_Relation"/>
</select>

<select id="listExpertTagUserId" resultType="java.lang.Long"
parameterType="com.ningdatech.pmapi.expert.model.query.ListExpertQuery">
<include refid="Expert_Tag_Relation"/>
</select>

</mapper>

+ 21
- 2
pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java Bestand weergeven

@@ -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<Long> listExpertUserId(ListExpertQuery listExpertQuery) {
List<Long> userIdList = expertAdminManageMapper.listExpertUserId(listExpertQuery);

List<ExpertTagQuery> expertTagQueryList = listExpertQuery.getExpertTagQueryList();
if (CollectionUtils.isNotEmpty(expertTagQueryList)) {
List<Long> tagUserIdList = expertAdminManageMapper.listExpertTagUserId(listExpertQuery);
userIdList.retainAll(tagUserIdList);
}

List<ExpertDictionaryQuery> expertDictionaryQueryList = listExpertQuery.getExpertDictionaryQueryList();
if (CollectionUtils.isNotEmpty(expertDictionaryQueryList)) {
List<Long> dictionaryUserIdList = expertAdminManageMapper.listExpertDictionaryUserId(listExpertQuery);
userIdList.retainAll(dictionaryUserIdList);
}
return userIdList;
}


@Override
public CommonPage<ExpertAdminExpertManageListDTO> getExpertLibraryList(ExpertAdminExpertManageQueryCmd req) {
ListExpertQuery listExpertQuery = buildListExpertQuery(req);
List<Long> userIdList = expertAdminManageMapper.listExpertUserId(listExpertQuery);
List<Long> userIdList = listExpertUserId(listExpertQuery);

List<ExpertUserFullInfo> 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<Long> filterExpertUserIdList(ExpertAdminExpertManageQueryCmd queryCmd) {
ListExpertQuery listExpertQuery = buildListExpertQuery(queryCmd);
return expertAdminManageMapper.listExpertUserId(listExpertQuery);
return listExpertUserId(listExpertQuery);
}
}

Laden…
Annuleren
Opslaan