Selaa lähdekoodia

待修改的代码

zhoutg 6 vuotta sitten
vanhempi
commit
3e5a895e6c

+ 25 - 25
icssman-service/src/main/java/com/diagbot/facade/QuestionFacade.java

@@ -39,10 +39,8 @@ import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
-import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.util.UserUtils;
-import com.diagbot.vo.ConceptExistVO;
 import com.diagbot.vo.DeleteQuestionVO;
 import com.diagbot.vo.GetQuestionIdsByTypeVO;
 import com.diagbot.vo.GetQuestionInfoVO;
@@ -429,30 +427,32 @@ public class QuestionFacade extends QuestionInfoServiceImpl {
         if (res.getTotal() <= 0) {
             return res;
         }
-//        List<String> personIds = res.getRecords().stream().map(row -> row.getModifier()).collect(Collectors.toList());
-//        RespDTO<Map<String, String>> mapRespDTO = userServiceClient.getUserInfoByIds(personIds);
-//        if (mapRespDTO == null || !CommonErrorCode.OK.getCode().equals(mapRespDTO.code)) {
-//            throw new CommonException(CommonErrorCode.RPC_ERROR, "获取操作人失败");
-//        }
-//        for (QuestionPageDTO bean : res.getRecords()) {
-//            bean.setModifier(mapRespDTO.data.get(bean.getModifier()));
-//        }
-        List<String> nameList = res.getRecords().stream().map(row -> row.getTagName()).collect(Collectors.toList());
-        ConceptExistVO conceptExistVO = new ConceptExistVO();
-        conceptExistVO.setNameList(nameList);
-        conceptExistVO.setType(res.getRecords().get(0).getType());
-        try {
-            RespDTO<Map<String, Long>> resMap = knowledgemanServiceClient.getConceptMap(conceptExistVO);
-            RespDTOUtil.respNGDeal(resMap, "远程调用根据名称和类型获取概念列表失败");
-            Map<String, Long> map = resMap.data;
-            for (QuestionPageDTO bean :  res.getRecords()) {
-                if(map.get(bean.getTagName()) != null) {
-                    bean.setExist(true);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
+        List<String> personIds = res.getRecords().stream().map(row -> row.getModifier()).collect(Collectors.toList());
+        RespDTO<Map<String, String>> mapRespDTO = userServiceClient.getUserInfoByIds(personIds);
+        if (mapRespDTO == null || !CommonErrorCode.OK.getCode().equals(mapRespDTO.code)) {
+            throw new CommonException(CommonErrorCode.RPC_ERROR, "获取操作人失败");
         }
+        for (QuestionPageDTO bean : res.getRecords()) {
+            bean.setModifier(mapRespDTO.data.get(bean.getModifier()));
+        }
+
+        //TODO 待修改
+//        List<String> nameList = res.getRecords().stream().map(row -> row.getTagName()).collect(Collectors.toList());
+//        ConceptExistVO conceptExistVO = new ConceptExistVO();
+//        conceptExistVO.setNameList(nameList);
+//        conceptExistVO.setType(res.getRecords().get(0).getType());
+//        try {
+//            RespDTO<Map<String, Long>> resMap = knowledgemanServiceClient.getConceptMap(conceptExistVO);
+//            RespDTOUtil.respNGDeal(resMap, "远程调用根据名称和类型获取概念列表失败");
+//            Map<String, Long> map = resMap.data;
+//            for (QuestionPageDTO bean :  res.getRecords()) {
+//                if(map.get(bean.getTagName()) != null) {
+//                    bean.setExist(true);
+//                }
+//            }
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
         return res;
     }