|
@@ -291,7 +291,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
long total = response.hits().total().value();
|
|
long total = response.hits().total().value();
|
|
System.out.println("total:" + total);
|
|
System.out.println("total:" + total);
|
|
@@ -338,7 +338,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
@@ -405,7 +405,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
long total = response.hits().total().value();
|
|
long total = response.hits().total().value();
|
|
System.out.println("total:" + total);
|
|
System.out.println("total:" + total);
|
|
@@ -454,7 +454,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
@@ -521,7 +521,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
@@ -568,7 +568,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
@@ -658,7 +658,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
return response.hits().total().value();
|
|
return response.hits().total().value();
|
|
}
|
|
}
|
|
@@ -690,7 +690,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
return response.hits().total().value();
|
|
return response.hits().total().value();
|
|
}
|
|
}
|
|
@@ -724,7 +724,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<EsExportRefreshVO> list = new ArrayList<>();
|
|
List<EsExportRefreshVO> list = new ArrayList<>();
|
|
@@ -878,7 +878,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
long total = response.hits().total().value();
|
|
long total = response.hits().total().value();
|
|
if (total > 1) {
|
|
if (total > 1) {
|
|
@@ -944,7 +944,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
long total = response.hits().total().value();
|
|
long total = response.hits().total().value();
|
|
System.out.println("total:" + total);
|
|
System.out.println("total:" + total);
|
|
@@ -992,7 +992,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
@@ -1034,7 +1034,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
long total = response.hits().total().value();
|
|
long total = response.hits().total().value();
|
|
System.out.println("total:" + total);
|
|
System.out.println("total:" + total);
|
|
@@ -1083,7 +1083,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
@@ -1368,7 +1368,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
@@ -1403,7 +1403,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
@@ -1440,7 +1440,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
@@ -1468,7 +1468,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
@@ -1503,7 +1503,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
@@ -1538,7 +1538,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
if (!CollectionUtils.isEmpty(hits)) {
|
|
@@ -1564,7 +1564,7 @@ public class EsExportService {
|
|
response = client.search(builder.build(), Patent.class);
|
|
response = client.search(builder.build(), Patent.class);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
- throw new XiaoShiException(e.getMessage());
|
|
|
|
|
|
+ throw new XiaoShiException(ExceptionEnum.BUSINESS_ERROR, e.getMessage());
|
|
}
|
|
}
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
List<Hit<Patent>> hits = response.hits().hits();
|
|
Map<String, String> map = new HashMap<>();
|
|
Map<String, String> map = new HashMap<>();
|