|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sooka.sponest.monitor.dahua.domain.CenternonitorTDahuaOperateLog;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.http.HttpEntity;
|
|
|
import org.apache.http.HttpResponse;
|
|
|
import org.apache.http.client.HttpClient;
|
|
@@ -98,6 +99,9 @@ public class DahuaOperateLogWhiteTask {
|
|
|
HttpEntity responseEntity = response.getEntity();
|
|
|
if (responseEntity != null) {
|
|
|
String responseBody = EntityUtils.toString(responseEntity);
|
|
|
+ if (StringUtils.isEmpty(responseBody)) {
|
|
|
+ log.error("token失效或请求失败");
|
|
|
+ }
|
|
|
JSONObject jsonObject = JSONObject.parseObject(responseBody);
|
|
|
pageNo = (Integer) jsonObject.get("totalCount") / 512 + 1;
|
|
|
nextPage = (Integer) jsonObject.get("nextPage");
|