客户信息删除代码更新

This commit is contained in:
z66
2025-12-04 09:46:44 +08:00
parent 49fc75214f
commit 1e83d5b19a
6 changed files with 192 additions and 32 deletions
+8 -5
View File
@@ -278,24 +278,27 @@ class F6PluginModule:
Returns:
Dict[str, str]: 包含执行状态的字典
"""
print('执行 删除客户')
entry_data = api_instance.entry_data_get(data=data)
username = entry_data['data']['账号']
password = entry_data['data']['密码']
company_name = entry_data['data']['公司名称']
res = F6Module.login_in(username, password, company_name)
print(res.json())
if res is not None:
cookies = requests.utils.dict_from_cookiejar(res.cookies)
url = "https://yunxiu.f6car.cn/member/customer/listForPermission?pageSize=50000&pageNo=1"
url = "https://yunxiu.f6car.cn/member/customer/listForPermission?pageSize=30000&pageNo=1"
res = requests.get(url, cookies=cookies)
json = res.json()
total = res.json().get('data', {}).get('total', 0)
if json:
if total:
total = int(total)
thread = threading.Thread(target=delete_customer_background,
args=(data, cookies, json['data']['data'],))
args=(data, cookies, total,))
thread.start()
return {'msg': '正在执行中', 'msg_details': '8-20点3.5s一条数据,其余时间1.5s一条数据'}
return {'msg': '正在执行中', 'msg_details': f'总计{total}条数据,8-20点3.5s一条数据,其余时间1.5s一条数据'}
else:
return {'msg': '未执行', 'msg_details': '无客户信息'}
else: