新增m_date周边
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
小区周边1公里银行入库业务逻辑
|
||||
"""
|
||||
import logging
|
||||
from goojia_utils import MAIN_MONGO_CLIENT, process_dataframe_multithread
|
||||
from goojia_utils import MAIN_MONGO_CLIENT, process_dataframe_multithread, dateutils
|
||||
import pandas as pd
|
||||
from pymongo import UpdateOne
|
||||
from datetime import datetime
|
||||
|
||||
import poiutils
|
||||
|
||||
@@ -75,7 +76,7 @@ def sync_new(distance=3000):
|
||||
action = UpdateOne({'city': item['city'], 'region': item['region'],
|
||||
'district_name': item['name']},
|
||||
{'$set': {'bank': item['bank'], 'city': item['city'], 'region': item['region'],
|
||||
'district_name': item['name'], 'lng': item['lng'], 'lat': item['lat'], 'distance': distance}},
|
||||
'district_name': item['name'], 'lng': item['lng'], 'lat': item['lat'], 'm_date': datetime.now(), 'distance': distance}},
|
||||
upsert=True)
|
||||
actions.append(action)
|
||||
except Exception as e:
|
||||
@@ -111,7 +112,7 @@ def sync1():
|
||||
action = UpdateOne({'city': item['city'], 'region': item['region'],
|
||||
'district_name': item['name']},
|
||||
{'$set': {'bank': item['bank'], 'city': item['city'], 'region': item['region'],
|
||||
'district_name': item['name'], 'lng': item['lng'], 'lat': item['lat']}},
|
||||
'district_name': item['name'], 'lng': item['lng'], 'lat': item['lat'], 'm_date': datetime.now()}},
|
||||
upsert=True)
|
||||
actions.append(action)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user