|
|
@@ -27,6 +27,7 @@ import org.apache.http.impl.client.LaxRedirectStrategy;
|
|
|
import org.apache.http.ssl.SSLContextBuilder;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -63,6 +64,8 @@ public class PersonCountGroupJob {
|
|
|
private final String appSecret1 = "73e68e1ea7b3757a96ff847b97a20ed161746e30";
|
|
|
|
|
|
|
|
|
+ // 使用 cron 表达式配置每30分钟执行一次
|
|
|
+ @Scheduled(cron = "0 */30 * * * ?")
|
|
|
public void getPersonCountGroup() throws Exception {
|
|
|
log.info("开始执行海康获取客流量统计定时任务");
|
|
|
List<ZhjqPassengerFlow> list = PersonCountGroupURL.PersonCountGroupURL(host, appKey, appSecret);
|