This commit is contained in:
hailin 2024-10-25 16:04:11 +08:00
parent 5c582904dc
commit 1307f63225
1 changed files with 4 additions and 1 deletions

5
app.py
View File

@ -162,7 +162,10 @@ def update_customers(index):
email["owner's name"] = updated_data.get(f'{domain}_owner_name_{j}', [email["owner's name"]])[0]
email['email address'] = updated_data.get(f'{domain}_email_address_{j}', [email['email address']])[0]
email['category'] = updated_data.get(f'{domain}_category_{j}', [email['category']])[0]
email['promotion history'] = updated_data.get(f'{domain}_promotion_history_{j}', [', '.join(email['promotion history'])])[0].split(', ')
#email['promotion history'] = updated_data.get(f'{domain}_promotion_history_{j}', [', '.join(email['promotion history'])])[0].split(', ')
if 'promotion history' in email:
email['promotion history'] = updated_data.get(f'{domain}_promotion_history_{j}', [', '.join(email['promotion history'])])[0].split(', ')
# 如果 'promotion history' 不存在,什么都不做,直接跳过
# 将更新后的数据保存到 ES 数据库
store_to_es(key, buf, 'customer')