Commit 1523ed6f by 岳巧源

add update ext attr

parent b5f14435
Showing with 15 additions and 2 deletions
...@@ -126,11 +126,24 @@ def update_jd_attr_by_class(conf: dict): ...@@ -126,11 +126,24 @@ def update_jd_attr_by_class(conf: dict):
def update_ext_attr_by_class_ids(): def update_ext_attr_by_class_ids(conf: dict):
""" """
基于lie_shop_attr中的class_id来更新 “拓展” 属性 基于lie_shop_attr中的class_id来更新 “拓展” 属性
""" """
pass host = conf["host"]
port = conf["port"]
user = conf["user"]
password = conf["password"]
database = conf["database"]
db = pymysql.connect(host=host, port=port, user=user, password=password, database=database)
select_sql = "select distinct class_id from lie_shop_attr"
cursor = db.cursor()
cursor.execute(query=select_sql)
results = cursor.fetchall()
class_ids = []
for i in range(len(results)):
class_ids.append(results[i][0])
......
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