Bläddra i källkod

fix 专家库搜索内外围专家报错

tags/24080901
niohe·erbao 1 år sedan
förälder
incheckning
dcb1a766a3
3 ändrade filer med 45 tillägg och 10 borttagningar
  1. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java
  2. +18
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.xml
  3. +21
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/expert/service/impl/ExpertAdminManageServiceImpl.java

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/expert/mapper/ExpertAdminManageMapper.java Visa fil

@@ -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 Visa fil

@@ -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 Visa fil

@@ -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);
}
}

Laddar…
Avbryt
Spara