Merge branch 'script_gj' into 'master'
商铺租金扩展到2公里,3公里 See merge request !1197
This commit is contained in:
+1
-1
@@ -5831,7 +5831,7 @@ class CommonDatautils {
|
|||||||
"must": [
|
"must": [
|
||||||
{
|
{
|
||||||
"geo_distance": {
|
"geo_distance": {
|
||||||
"distance": "1km",
|
"distance": "${distance}",
|
||||||
"location": {
|
"location": {
|
||||||
"lat": ${lat},
|
"lat": ${lat},
|
||||||
"lon": ${lng}
|
"lon": ${lng}
|
||||||
|
|||||||
+6
@@ -285,6 +285,12 @@ class CZDataBatch extends BaseBatch{
|
|||||||
def getRentPrice(def city, def lng, def lat){
|
def getRentPrice(def city, def lng, def lat){
|
||||||
def p_date = DateUtils.formatDateByPattern(DateUtil.add(new Date(), -365),'yyyy-MM-dd')
|
def p_date = DateUtils.formatDateByPattern(DateUtil.add(new Date(), -365),'yyyy-MM-dd')
|
||||||
def rets = CommonDatautils.findSeawater(city, lng, lat, "1km", p_date, "shop_rent")
|
def rets = CommonDatautils.findSeawater(city, lng, lat, "1km", p_date, "shop_rent")
|
||||||
|
if(!rets){
|
||||||
|
rets = CommonDatautils.findSeawater(city, lng, lat, "2km", p_date, "shop_rent")
|
||||||
|
if(!rets){
|
||||||
|
rets = CommonDatautils.findSeawater(city, lng, lat, "3km", p_date, "shop_rent")
|
||||||
|
}
|
||||||
|
}
|
||||||
if(rets){
|
if(rets){
|
||||||
def prices = []
|
def prices = []
|
||||||
for(def r : rets){
|
for(def r : rets){
|
||||||
|
|||||||
Reference in New Issue
Block a user