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