Compare commits
3 Commits
4ac7dfecd3
...
da8340d41e
Author | SHA1 | Date |
---|---|---|
wangliwen | da8340d41e | |
wangliwen | f3d482707e | |
wangliwen | 3fbe2ea2ff |
|
@ -64,7 +64,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!params.containsKey("creator")) {
|
if (!params.containsKey("creator")) {
|
||||||
wrapper.eq(StringUtils.isNotBlank(params.get("creator").toString()), "del_flag", 0);
|
wrapper.eq("del_flag", 0);
|
||||||
}
|
}
|
||||||
wrapper.orderByDesc("create_date");
|
wrapper.orderByDesc("create_date");
|
||||||
return wrapper;
|
return wrapper;
|
||||||
|
|
|
@ -257,12 +257,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
CompletableFuture cloud = CompletableFuture.runAsync(() -> { // 云脑专网
|
CompletableFuture cloud = CompletableFuture.runAsync(() -> { // 云脑专网
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
String url = String.format(tsingtao_xhaProperties.getCloudcam(), resourceDTO.getName(), pageNum, pageSize);
|
String url = String.format(tsingtao_xhaProperties.getCloudcam(), org.apache.commons.lang3.StringUtils.isNotEmpty(resourceDTO.getName()) ? resourceDTO.getName() : "", pageNum, pageSize);
|
||||||
logger.info(url);
|
logger.info(url);
|
||||||
Request request = new Request.Builder().url(url).build();
|
Request request = new Request.Builder().url(url).build();
|
||||||
try (Response response = client.newCall(request).execute()) {
|
try (Response response = client.newCall(request).execute()) {
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
JSONObject jsonObject_ = JSON.parseObject(response.body().string());
|
String body = response.body().string();
|
||||||
|
JSONObject jsonObject_ = JSON.parseObject(body);
|
||||||
|
logger.info("西海岸接口返回:{}" + body, url);
|
||||||
if (jsonObject_.containsKey("data")) {
|
if (jsonObject_.containsKey("data")) {
|
||||||
if (jsonObject_.getJSONObject("data").containsKey("list")) {
|
if (jsonObject_.getJSONObject("data").containsKey("list")) {
|
||||||
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
|
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
|
||||||
|
@ -296,12 +298,14 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
});
|
});
|
||||||
CompletableFuture local = CompletableFuture.runAsync(() -> { // 金宏网
|
CompletableFuture local = CompletableFuture.runAsync(() -> { // 金宏网
|
||||||
OkHttpClient client = new OkHttpClient();
|
OkHttpClient client = new OkHttpClient();
|
||||||
String url = String.format(tsingtao_xhaProperties.getLocalcam(), resourceDTO.getName(), pageNum, pageSize);
|
String url = String.format(tsingtao_xhaProperties.getLocalcam(), org.apache.commons.lang3.StringUtils.isNotEmpty(resourceDTO.getName()) ? resourceDTO.getName() : "", pageNum, pageSize);
|
||||||
logger.info(url);
|
logger.info(url);
|
||||||
Request request = new Request.Builder().url(url).build();
|
Request request = new Request.Builder().url(url).build();
|
||||||
try (Response response = client.newCall(request).execute()) {
|
try (Response response = client.newCall(request).execute()) {
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
JSONObject jsonObject_ = JSON.parseObject(response.body().string());
|
String body = response.body().string();
|
||||||
|
JSONObject jsonObject_ = JSON.parseObject(body);
|
||||||
|
logger.info("西海岸接口返回:{}" + body, url);
|
||||||
if (jsonObject_.containsKey("data")) {
|
if (jsonObject_.containsKey("data")) {
|
||||||
if (jsonObject_.getJSONObject("data").containsKey("list")) {
|
if (jsonObject_.getJSONObject("data").containsKey("list")) {
|
||||||
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
|
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
|
||||||
|
@ -321,7 +325,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
return resourceDTO1;
|
return resourceDTO1;
|
||||||
}).collect(Collectors.toList()));
|
}).collect(Collectors.toList()));
|
||||||
} else {
|
} else {
|
||||||
resultPage.setRecords(null);
|
resultPage.setRecords(new ArrayList<>());
|
||||||
resultPage.setTotal(0);
|
resultPage.setTotal(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue