|
@@ -39,7 +39,6 @@ import com.diagbot.util.UserUtils;
|
|
|
import com.diagbot.vo.ConceptExistVO;
|
|
|
import com.diagbot.vo.ConceptSearchVO;
|
|
|
import com.diagbot.vo.DeleteQuestionVO;
|
|
|
-import com.diagbot.vo.GetQuestionIdsByTypeVO;
|
|
|
import com.diagbot.vo.GetQuestionInfoVO;
|
|
|
import com.diagbot.vo.GetQuestiongAndModuleRelationsVO;
|
|
|
import com.diagbot.vo.IndexIcssVO;
|
|
@@ -689,16 +688,16 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
return getQuestionInfoDTOS;
|
|
|
}
|
|
|
|
|
|
-// public List<Long> getQuestionIdsByType(GetQuestionIdsByTypeVO getQuestionIdsByTypeVO) {
|
|
|
-// QueryWrapper<QuestionInfo> queryWrapper = new QueryWrapper<>();
|
|
|
-// queryWrapper.in("id", getQuestionIdsByTypeVO.getQuestionIds())
|
|
|
-// .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
-// .eq("type", getQuestionIdsByTypeVO.getQuestionType());
|
|
|
-// List<QuestionInfo> questionInfoList = this.list(queryWrapper);
|
|
|
-// List<Long> questionIds = questionInfoList.stream().map(questionInfo -> questionInfo.getId())
|
|
|
-// .collect(Collectors.toList());
|
|
|
-// return questionIds;
|
|
|
-// }
|
|
|
+ // public List<Long> getQuestionIdsByType(GetQuestionIdsByTypeVO getQuestionIdsByTypeVO) {
|
|
|
+ // QueryWrapper<QuestionInfo> queryWrapper = new QueryWrapper<>();
|
|
|
+ // queryWrapper.in("id", getQuestionIdsByTypeVO.getQuestionIds())
|
|
|
+ // .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ // .eq("type", getQuestionIdsByTypeVO.getQuestionType());
|
|
|
+ // List<QuestionInfo> questionInfoList = this.list(queryWrapper);
|
|
|
+ // List<Long> questionIds = questionInfoList.stream().map(questionInfo -> questionInfo.getId())
|
|
|
+ // .collect(Collectors.toList());
|
|
|
+ // return questionIds;
|
|
|
+ // }
|
|
|
|
|
|
/**
|
|
|
* 根据参数返回标签内容
|
|
@@ -833,19 +832,23 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
|
|
|
RespDTOUtil.respNGDeal(res, "【远程调用】搜索概念失败");
|
|
|
|
|
|
// 过滤已添加的标签
|
|
|
- List<QuestionInfo> questionInfoList = this.list(new QueryWrapper<QuestionInfo>()
|
|
|
- .in("tag_name", res.data.stream().map(row -> row.getName()).collect(Collectors.toList()))
|
|
|
- .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
- .eq("type", indexIcssVO.getType())
|
|
|
- .ne("tag_type", TagTypeEnum.T8.getKey()));
|
|
|
- List<String> nameExist = questionInfoList.stream().map(row -> row.getTagName()).collect(Collectors.toList());
|
|
|
- if (ListUtil.isNotEmpty(nameExist)) {
|
|
|
- for (int i = 0; i < res.data.size(); i++) {
|
|
|
- if (nameExist.contains(res.data.get(i).getName())) {
|
|
|
- res.data.remove(i--);
|
|
|
+ List<String> tagNames = res.data.stream().map(row -> row.getName()).collect(Collectors.toList());
|
|
|
+ if (ListUtil.isNotEmpty(tagNames)){
|
|
|
+ List<QuestionInfo> questionInfoList = this.list(new QueryWrapper<QuestionInfo>()
|
|
|
+ .in("tag_name", tagNames)
|
|
|
+ .eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
+ .eq("type", indexIcssVO.getType())
|
|
|
+ .ne("tag_type", TagTypeEnum.T8.getKey()));
|
|
|
+ List<String> nameExist = questionInfoList.stream().map(row -> row.getTagName()).collect(Collectors.toList());
|
|
|
+ if (ListUtil.isNotEmpty(nameExist)) {
|
|
|
+ for (int i = 0; i < res.data.size(); i++) {
|
|
|
+ if (nameExist.contains(res.data.get(i).getName())) {
|
|
|
+ res.data.remove(i--);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return res.data;
|
|
|
}
|
|
|
}
|