|
|
@@ -6,6 +6,7 @@ import com.uas.platform.b2b.dao.PurchaseOrderDao;
|
|
|
import com.uas.platform.b2b.model.CommunalLog;
|
|
|
import com.uas.platform.core.util.HttpUtil;
|
|
|
import org.apache.http.client.methods.HttpRequestBase;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
@@ -40,6 +41,8 @@ public class SendNoticeTask {
|
|
|
@Autowired
|
|
|
PurchaseOrderDao purchaseOrderDao;
|
|
|
|
|
|
+ private static final Logger logger = Logger.getLogger(SendNoticeTask.class);
|
|
|
+
|
|
|
/**
|
|
|
* 时间格式
|
|
|
*/
|
|
|
@@ -107,6 +110,7 @@ public class SendNoticeTask {
|
|
|
HttpUtil.Response response = HttpUtil.sendGetRequest(searchInfoUrl + id, null);
|
|
|
if (StringUtils.isEmpty(response.getResponseText())) {
|
|
|
noExistIds.add(id);
|
|
|
+ logger.error(String.format("表"+tableName+"未建索引","id为"+id));
|
|
|
}
|
|
|
}
|
|
|
if (!CollectionUtils.isEmpty(noExistIds)) {
|
|
|
@@ -120,8 +124,6 @@ public class SendNoticeTask {
|
|
|
};
|
|
|
request.addHeader("Authorization", "Basic YWRtaW46c2VsZWN0MTExKioq");
|
|
|
request.setURI(URI.create(searchUpdateUrl + noExistId));
|
|
|
- HttpUtil.Response response = HttpUtil.sendHttpUriRequest(request);
|
|
|
- System.out.println(noExistId + " " + response.getResponseText());
|
|
|
}
|
|
|
}
|
|
|
}
|