Commit e6369c5c by 岳巧源

add update

parent 023e32be
Showing with 17 additions and 10 deletions
...@@ -163,7 +163,7 @@ def update_vc_attr(conf: dict): ...@@ -163,7 +163,7 @@ def update_vc_attr(conf: dict):
else: else:
print("此input_type类型暂未兼容处理!请单独处理!") print("此input_type类型暂未兼容处理!请单独处理!")
create_time = int(time.time()) create_time = int(time.time())
update_time = int(time.time())
""" """
检查属性需不需要更新等等。。。 检查属性需不需要更新等等。。。
""" """
...@@ -206,8 +206,8 @@ def update_vc_attr(conf: dict): ...@@ -206,8 +206,8 @@ def update_vc_attr(conf: dict):
exists_attr = True exists_attr = True
for key in origin_attr_map: for key in origin_attr_map:
if origin_attr_map[key] != now_attr_map[key]: 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, is_mapping = 0 where id = %s" 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, primary_id)) cursor.execute(query=update_sql1, args=(unit, enum_value, input_type, is_required, update_time, primary_id))
db.commit() db.commit()
print(update_sql1 % (unit, enum_value, input_type, is_required, primary_id)) print(update_sql1 % (unit, enum_value, input_type, is_required, primary_id))
break break
......
delete from lie_shop_class where platform = 1; -- delete from lie_shop_class where platform = 1;
delete from lie_shop_attr where platform = 1; -- delete from lie_shop_attr where platform = 1;
delete from lie_shop_class_mapping where platform = 1; -- delete from lie_shop_class_mapping where platform = 1;
delete from lie_shop_attr_mapping where platform = 1; -- delete from lie_shop_attr_mapping where platform = 1;
select apply_id from lie_shop_push_sku_log where spu_id = 1 and sku_id = 1 order by create_time desc limit 1; -- select apply_id from lie_shop_push_sku_log where spu_id = 1 and sku_id = 1 order by create_time desc limit 1;
--
--
-- update lie_shop_push_sku_log set audit_status = 0 where ware_id == ""
--
alter table lie_shop_push_sku_log add column stock_num int unsigned default 0 not null comment '库存数量' after ware_id;
update lie_shop_push_sku_log set audit_status = 0 where ware_id == "" alter table lie_shop_push_sku_log change status push_status tinyint(1) unsigned default 0 not null comment '发品状态 -1:失败 1:成功';
\ No newline at end of file
alter table lie_shop_push_sku_log add column init_status tinyint(1) unsigned default 0 not null comment '库存、时效初始化状态 -1:失败 1:成功' after update_time;
\ 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