chore: snapshot local changes

This commit is contained in:
2026-05-20 16:06:17 +08:00
parent 13925e5070
commit 8bfe38e9dc
21 changed files with 20723 additions and 153 deletions
+32 -29
View File
@@ -168,26 +168,27 @@ tent2 = All_Setting(host="183.6.7.91", port=33016, db="tk_test")
format_today = str(datetime.date.today()).replace("-", "")
# shop_id_list = [10000439]
shop_id_list = [
10000439,
10000900,
10000880,
10000665,
10000839,
10000519,
10001060,
10000163,
10000952,
10000956,
10001084,
10001075,
10001107,
10001195,
10001222,
10001400,
10001506,
10001575,
# 10000439,
# 10000900,
# 10000880,
# 10000665,
# 10000839,
# 10000519,
# 10001060,
# 10000163,
# 10000952,
# 10000956,
# 10001084,
# 10001075,
# 10001107,
# 10001195,
# 10001222,
# 10001400,
# 10001506,
# 10001575,
10000745, # 长春桥店, 正常不跑
]
id_dict = {
10000439: 238,
@@ -208,6 +209,7 @@ id_dict = {
10001400: 2177,
10001506: 2188,
10001575: 2187,
10000745: 0000,
}
work_id = format_today
city_dict = {
@@ -283,6 +285,7 @@ for shop_id in shop_id_list:
FROM category_detail_log
WHERE shop_id = '{shop_id}'
AND work_id LIKE '{work_id}%'
and one_id = 40485
"""
da123 = tent2.get_shoppingmalls(sql3)
print(f"shop_id={shop_id}, 日志 {len(da123)} 条")
@@ -355,7 +358,7 @@ for shop_id in shop_id_list:
vip_price = i.get("lxInfo", {}).get("member_price", None)
da2 = (
work_id,
# "第五次测试",
# "第12次测试",
goods_id,
s_id,
station_id,
@@ -378,15 +381,15 @@ for shop_id in shop_id_list:
json.dumps(i),
)
all_clean_data.append(da2)
sql = """
INSERT INTO data_completed
(work_id, goods_id, s_id, station_id, `desc`, f_id, f_name, goods_tag, image,
is_immediate, original_price, price, price_tag, s_name, shop_id, t_id, t_name,
title, token, vip_price,json_data)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
"""
tent2.write_data(sql, all_clean_data)
# sql = """
# INSERT INTO data_completed
# (work_id, goods_id, s_id, station_id, `desc`, f_id, f_name, goods_tag, image,
# is_immediate, original_price, price, price_tag, s_name, shop_id, t_id, t_name,
# title, token, vip_price,json_data)
# VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
#
# """
# tent2.write_data(sql, all_clean_data)
end_time = time.time()
print(f"运行时间是:{end_time - start_time}")