优化价格类型

This commit is contained in:
沈健
2025-03-31 14:43:22 +08:00
parent 515351d56b
commit dcce114957
5 changed files with 41 additions and 33 deletions
+1 -3
View File
@@ -60,7 +60,7 @@ def calc(city, year_month):
action = UpdateOne({'cat': 'office', 'city': curr_city, 'district': region, 'name': name, 'date': year_month},
{'$set': {'city': curr_city, 'cat': 'office', 'date': year_month, 'district': region,
'name': name,
'avg_price': sell_price, 'estate_type2': estate_type2, 'bed_kind': bed_kind,
'avg_price': int(sell_price), 'estate_type2': estate_type2, 'bed_kind': bed_kind,
'location': location,
'calc_type': 5, 'updated_date': datetime.now()}},
upsert=True)
@@ -85,8 +85,6 @@ if yearmonth == '':
try:
if type(yearmonth) is str:
yearmonth = int(yearmonth)
# for curr_city in areautils.get_all_cities():
# print("正在处理城市:{}".format(curr_city))
calc(None, yearmonth)
except Exception as e:
print(e)