master
wenfei 3 months ago
parent c1ad5f6273
commit 23b238c6a7

@ -37,14 +37,14 @@ public class ScheduledService {
* @description:
* @Param: null
*/
@Scheduled(cron = "0 0 0/12 * * *")
@Scheduled(cron = "0 0/1 * * * *")
public void getNmcWeatherProvince() {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
CmIp ipAddress = new CmIp();
log.info("=====>>>>>使用cron:"+String.valueOf(System.currentTimeMillis()));
Long addressId = 1L;
Gson gson = new Gson();
String ip = QueryHelper.queryIP("");
String ip = QueryHelper.queryIpHk("");
if(ip!=null){
log.info("ip:"+ip);
}

@ -40,8 +40,12 @@ public class QueryHelper {
System.out.println("url:"+url);
//String token = "b8b56497ffff4e110a3bf44193f7f751";
String token = "dfeaa72fc70037534c4b4e8d831a5207";
return get(url, token);
}
public static String queryIpHk(String ip) {
String url = "http://47.242.184.139:8088/ip2";
System.out.println("url:"+url);
String token = "dfeaa72fc70037534c4b4e8d831a5207";
return get(url,token);
}
}
Loading…
Cancel
Save