Commit 20b1cedf authored by 张彦钊's avatar 张彦钊

change sql for test

parent 46f936c1
......@@ -176,7 +176,8 @@ def update_dairy_queue(score_df):
diary_id = score_df["cid"].values.tolist()
all_video_id = get_video_id()
video_id = list(set(all_video_id)&set(diary_id))
print("交集")
print(video_id)
# x = 1
# while x < len(diary_id):
# video_id.append(diary_id[x])
......@@ -211,6 +212,7 @@ def update_sql_dairy_queue(queue_name, diary_id):
cursor = db.cursor()
## 去除diary_id 前面的"diary|"
diary_id = json.dumps(list(map(lambda x:x[6:],diary_id)))
sql = "update device_diary_queue set {}='{}' where device_id = '{}'".format(queue_name, diary_id, device_id)
cursor.execute(sql)
db.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment