Commit 6ff93c40 by 岳巧源

select clz

parent 47cc8e35
Showing with 15 additions and 2 deletions
......@@ -83,5 +83,18 @@ def modify_apply_id_map():
db.commit()
print(update_sql % (apply_id, id))
def select_clz_ids():
conf = config_prod
db = pymysql.connect(host=conf["mysql"]["host"], port=conf["mysql"]["port"], user=conf["mysql"]["user"], password=conf["mysql"]["password"], database=conf["mysql"]["database"])
cursor = db.cursor()
select_sql = "select lie_class_id from lie_shop_class_mapping where platform = 1"
cursor.execute(query=select_sql)
db_result = cursor.fetchall()
ans = []
for i in range(len(db_result)):
class_id = db_result[i][0]
ans.append(class_id)
print(ans)
if __name__ == '__main__':
modify_apply_id_map()
\ No newline at end of file
select_clz_ids()
\ No newline at end of file
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 sign in to comment