You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
796 B
17 lines
796 B
# -*- coding: utf-8 -*-
|
|
"""票 05:按 seed-manifest 商机名复活全部 e2e seed 商机。"""
|
|
import io, sys, json
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
|
|
import pymysql
|
|
|
|
mf = json.load(open(r'e:\code\crm-backend-matt\.scratch\opportunity-e2e\seed-manifest.json', encoding='utf-8'))
|
|
# 打印 manifest 顶层结构(找商机名 -> id 映射)
|
|
print('manifest keys:', list(mf.keys())[:10])
|
|
conn = pymysql.connect(host='8.129.84.155', port=3306, user='root', password='Itc@123456',
|
|
database='crm', charset='utf8mb4', autocommit=True)
|
|
cur = conn.cursor()
|
|
cur.execute("SELECT id, opp_name, opp_status, deleted FROM opportunity WHERE opp_name LIKE 'e2e-%' "
|
|
"ORDER BY create_time")
|
|
for r in cur.fetchall():
|
|
print(r)
|
|
conn.close()
|
|
|