|
@@ -761,14 +761,15 @@ public class EsService {
|
|
|
long total = response.hits().total().value();
|
|
|
for (Hit<Patent> hit : hits) {
|
|
|
Patent esMess = hit.source();
|
|
|
- dto.setClaim(JSON.toJSONString(esMess.getClaim()));
|
|
|
-// if (esMess != null) {
|
|
|
-// String claim = StringUtils.strip(JSON.toJSONString(esMess.getClaim()), "[]");
|
|
|
-// ClaimDetailDTO claimDetailDTO = JSONObject.parseObject(claim, ClaimDetailDTO.class);
|
|
|
-// if (claimDetailDTO.getIfOrigin()) {
|
|
|
-// dto.setClaim(claimDetailDTO.getTextContent());
|
|
|
-// }
|
|
|
-// }
|
|
|
+// dto.setClaim(JSON.toJSONString(esMess.getClaim()));
|
|
|
+ //只返回具体内容
|
|
|
+ if (esMess != null) {
|
|
|
+ String claim = StringUtils.strip(JSON.toJSONString(esMess.getClaim()), "[]");
|
|
|
+ ClaimDetailDTO claimDetailDTO = JSONObject.parseObject(claim, ClaimDetailDTO.class);
|
|
|
+ if (Boolean.TRUE.equals(claimDetailDTO.getIfOrigin())) {
|
|
|
+ dto.setClaim(claimDetailDTO.getTextContent());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
return dto;
|
|
|
}
|