Commit efbabccd by 岳巧源

add attr id

parent 16a37cad
Showing with 6 additions and 6 deletions
......@@ -207,10 +207,10 @@ def update_vc_attr(conf: dict):
exists_attr = True
for key in origin_attr_map:
if origin_attr_map[key] != now_attr_map[key]:
update_sql1 = "update lie_shop_attr set unit = %s, enum_value = %s, input_type = %s, is_required = %s, update_time = %s , is_mapping = 0 where id = %s"
cursor.execute(query=update_sql1, args=(unit, enum_value, input_type, is_required, update_time, primary_id))
update_sql1 = "update lie_shop_attr set attr_id = %s, attr_name = %s, unit = %s, enum_value = %s, input_type = %s, is_required = %s, update_time = %s , is_mapping = 0 where id = %s"
cursor.execute(query=update_sql1, args=(attr_id, attr_name, unit, enum_value, input_type, is_required, update_time, primary_id))
db.commit()
print(update_sql1 % (unit, enum_value, input_type, is_required,update_time, primary_id))
print(update_sql1 % (attr_id, attr_name, unit, enum_value, input_type, is_required,update_time, primary_id))
break
break
else:
......@@ -368,11 +368,11 @@ def update_vc_ext_attr(conf):
exists_attr = True
for key in origin_attr_map:
if origin_attr_map[key] != now_attr_map[key]:
update_sql1 = "update lie_shop_attr set unit = %s, enum_value = %s, input_type = %s, is_required = %s, update_time = %s , is_mapping = 0 where id = %s"
update_sql1 = "update lie_shop_attr set attr_id = %s, attr_name = %s, unit = %s, enum_value = %s, input_type = %s, is_required = %s, update_time = %s , is_mapping = 0 where id = %s"
cursor.execute(query=update_sql1,
args=(unit, enum_value, input_type, is_required, update_time, primary_id))
args=(attr_id, attr_name, unit, enum_value, input_type, is_required, update_time, primary_id))
db.commit()
print(update_sql1 % (unit, enum_value, input_type, is_required, update_time, primary_id))
print(update_sql1 % (attr_id, attr_name, unit, enum_value, input_type, is_required, update_time, primary_id))
break
break
else:
......
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