提交 b1fbef92 authored 作者: 000516's avatar 000516

获取百度地理编码;更新百度ak

......@@ -33,10 +33,12 @@ public class LsDisStoreDaoImpl {
updateanhui(lsDisStores,ldsId);
}
// OI4hMr7tEUoDBhSYxcrOGslnnBfZmD2b
// 1ZKO0CGs6nm9HuZWR6ucRiu4p9kM8f3i
private void updateanhui(List<LsDisStore> lsDisStores,Long ldsId){
for (LsDisStore lsDisStore : lsDisStores) {
String outlet = lsDisStore.getOutletName()+lsDisStore.getOutletAddress();
String s = HttpUtil.get("https://api.map.baidu.com/geocoding/v3/?address="+outlet+"&output=json&ak=1ZKO0CGs6nm9HuZWR6ucRiu4p9kM8f3i&city="+lsDisStore.getReCity());
String s = HttpUtil.get("https://api.map.baidu.com/geocoding/v3/?address="+outlet+"&output=json&ak=OI4hMr7tEUoDBhSYxcrOGslnnBfZmD2b&city="+lsDisStore.getReCity());
JSONObject bd = JSONObject.parseObject(s);
Integer status = bd.getInteger("status");
if (status.intValue() >= 300 && status.intValue() <= 399){
......@@ -70,11 +72,12 @@ public class LsDisStoreDaoImpl {
updateGuangzhou(lsDisStores,ldsId);
}
// sJFYkogPGt8kI3xkkSPwQQ9T61b4GVQV
// 8ptRbXOnQNX2TTqGVVYv5AUw3vJZ77gZ
private void updateGuangzhou(List<LsDisStore> lsDisStores,Long ldsId){
for (LsDisStore lsDisStore : lsDisStores) {
String outlet = lsDisStore.getOutletName()+lsDisStore.getOutletAddress();
String s = HttpUtil.get("https://api.map.baidu.com/geocoding/v3/?address="+outlet+"&output=json&ak=8ptRbXOnQNX2TTqGVVYv5AUw3vJZ77gZ&city="+lsDisStore.getReCity());
String s = HttpUtil.get("https://api.map.baidu.com/geocoding/v3/?address="+outlet+"&output=json&ak=sJFYkogPGt8kI3xkkSPwQQ9T61b4GVQV&city="+lsDisStore.getReCity());
JSONObject bd = JSONObject.parseObject(s);
Integer status = bd.getInteger("status");
if (status.intValue() >= 300 && status.intValue() <= 399){
......@@ -108,10 +111,12 @@ public class LsDisStoreDaoImpl {
updateanhuisp(lsDisStores,ldsId);
}
// StY6BS8Bw50TrclA4Zd52MfEjsL1zUXI
// anjhOkUMuRyTb3DZO6dMGRUCY2l0vAql
private void updateanhuisp(List<LsDisStore> lsDisStores,Long ldsId){
for (LsDisStore lsDisStore : lsDisStores) {
String outlet = lsDisStore.getOutletName()+lsDisStore.getOutletAddress();
String s = HttpUtil.get("https://api.map.baidu.com/geocoding/v3/?address="+outlet+"&output=json&ak=StY6BS8Bw50TrclA4Zd52MfEjsL1zUXI&city="+lsDisStore.getReCity());
String s = HttpUtil.get("https://api.map.baidu.com/geocoding/v3/?address="+outlet+"&output=json&ak=anjhOkUMuRyTb3DZO6dMGRUCY2l0vAql&city="+lsDisStore.getReCity());
JSONObject bd = JSONObject.parseObject(s);
Integer status = bd.getInteger("status");
if (status.intValue() >= 300 && status.intValue() <= 399){
......
......@@ -32,7 +32,7 @@
<!-- 修改 limit 数量-->
<select id="selectBaseO" resultMap="LsDisStoreBase">
select lds_if,re_province,re_city,outlet_address,outlet_name
from ls_dis_store where lds_if &gt; #{lastId} and lds_if &lt;= 500000 and re_area is null and lng is null and outlet_address is not null limit 1000;
from ls_dis_store where lds_if &gt; #{lastId} and lds_if &lt;= 500000 and re_area is null and lng is null limit 1000;
</select>
......@@ -45,7 +45,7 @@
<select id="selectBaseT" resultMap="LsDisStoreBase">
select lds_if,re_province,re_city,outlet_address,outlet_name
from ls_dis_store where lds_if &gt; #{lastId} and lds_if &lt;= 1000000 and re_area is null and lng is null and outlet_address is not null limit 1000;
from ls_dis_store where lds_if &gt; #{lastId} and lds_if &lt;= 1000000 and re_area is null and lng is null limit 1000;
</select>
......@@ -59,7 +59,7 @@
<select id="selectBaseS" resultMap="LsDisStoreBase">
select lds_if,re_province,re_city,outlet_address,outlet_name
from ls_dis_store where lds_if &gt; #{lastId} and lds_if &lt;= 1537130 and re_area is null and lng is null and outlet_address is not null limit 1000;
from ls_dis_store where lds_if &gt; #{lastId} and lds_if &lt;= 1537130 and re_area is null and lng is null limit 1000;
</select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论