提交知识库管理相关代码

main
liu 1 year ago
parent a36e71ae78
commit 013bf319b7

@ -19,9 +19,10 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.lang.reflect.Type; import java.util.ArrayList;
import java.net.HttpURLConnection; import java.util.List;
import java.util.*; import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Slf4j @Slf4j
@ -83,8 +84,11 @@ public class MatchToolServiceImpl implements MatchToolService {
if (result.getCode() != 200) { if (result.getCode() != 200) {
throw new BusinessException("匹配失败"); throw new BusinessException("匹配失败");
} }
List<MatchQuestionAnswerDTO> data = result.getData();
return result.getData(); if (CollUtil.isEmpty(data)){
throw new BusinessException("未识别的问题");
}
return data;
} catch (Exception e) { } catch (Exception e) {
log.error("调用talkQaSimilarity error ", e); log.error("调用talkQaSimilarity error ", e);
return null; return null;

Loading…
Cancel
Save