任务描述

任务背景:

当前lazada 和kogan 的新品,因为缺失类目问题,导致无法刊登,故现在需要按照之前的刷新逻辑,进行一次数据刷新,保证未切换白名单的账号可以正常获取到类目刊登



任务内容:

lazada 站点类目数据刷新SQL,执行已下逻辑


drop table temp_table;
create temporary table temp_table(
  sku varchar(16),
	SiteCode varchar(16),
	CategoryId varchar(256),
	`Name` varchar(128),
	ParentId varchar(128),
	FirstCategoryId varchar(128),
	CombinationNameEn varchar(1024),
	KEY pk(name)
) ENGINE = InnoDB;

INSERT into temp_table
SELECT a.Sku,a.SiteCode,a.CategoryId,b.`Name`,b.ParentId,b.FirstCategoryId,b.CombinationNameEn from p_market_product a
left join m_productcategory b on a.MarketId = b.MarketId and a.CategoryId = b.CategoryId and b.SiteCode = 'MY'
-- left join m_productcategory c on a.MarketId = c.MarketId and b.`Name` = c.`Name` and b.SiteCode = 'ID'
-- left join m_productcategory d on a.MarketId = d.MarketId and b.`Name` = d.`Name` and b.SiteCode = 'PH'
-- left join m_productcategory e on a.MarketId = e.MarketId and b.`Name` = e.`Name` and b.SiteCode = 'SG'
-- left join m_productcategory f on a.MarketId = f.MarketId and b.`Name` = f.`Name` and b.SiteCode = 'TH'
-- left join m_productcategory g on a.MarketId = g.MarketId and b.`Name` = g.`Name` and b.SiteCode = 'VN'
WHERE a.CustomerId=1 AND a.MarketId=58  and a.SiteCode = 'MY' and a.CategoryId is not null and a.CategoryId <> '' and a.LastModificationTime > '2023-02-07';


  update p_market_product m
 -- select m.sku,m.sitecode,m.CategoryId,c.sku,c.sitecode,c.CategoryId from p_market_product m
left join (
select a.sku,'PH' SiteCode,b.CategoryId from temp_table a
left join (select * from m_productcategory where MarketId = 58  and IsLeaf = 1 and SiteCode = 'PH') b on a.`Name` = b.`Name` and a.CombinationNameEn = b.CombinationNameEn
where b.CategoryId is not null 
) c on m.sku = c.sku and m.SiteCode = c.SiteCode
 set m.CategoryId = c.CategoryId,m.LastModifier = '0310类目更新'
where  m.CustomerId=1 AND m.MarketId=58 and m.SiteCode = 'PH' and (m.CategoryId is null or m.CategoryId = '') and c.sku is not null;

  update p_market_product m
 -- select m.sku,m.sitecode,m.CategoryId,c.sku,c.sitecode,c.CategoryId from p_market_product m
left join (
select a.sku,'SG' SiteCode,b.CategoryId from temp_table a
left join (select * from m_productcategory where MarketId = 58  and IsLeaf = 1 and SiteCode = 'SG') b on a.`Name` = b.`Name` and a.CombinationNameEn = b.CombinationNameEn
where b.CategoryId is not null 
) c on m.sku = c.sku and m.SiteCode = c.SiteCode
 set m.CategoryId = c.CategoryId,m.LastModifier = '0310类目更新'
where  m.CustomerId=1 AND m.MarketId=58 and m.SiteCode = 'SG' and (m.CategoryId is null or m.CategoryId = '') and c.sku is not null;

  update p_market_product m
 -- select m.sku,m.sitecode,m.CategoryId,c.sku,c.sitecode,c.CategoryId from p_market_product m
left join (
select a.sku,'TH' SiteCode,b.CategoryId from temp_table a
left join (select * from m_productcategory where MarketId = 58  and IsLeaf = 1 and SiteCode = 'TH') b on a.`Name` = b.`Name` and a.CombinationNameEn = b.CombinationNameEn
where b.CategoryId is not null 
) c on m.sku = c.sku and m.SiteCode = c.SiteCode
 set m.CategoryId = c.CategoryId,m.LastModifier = '0310类目更新'
where  m.CustomerId=1 AND m.MarketId=58 and m.SiteCode = 'TH' and (m.CategoryId is null or m.CategoryId = '') and c.sku is not null;

  update p_market_product m
 -- select m.sku,m.sitecode,m.CategoryId,c.sku,c.sitecode,c.CategoryId from p_market_product m
left join (
select a.sku,'VN' SiteCode,b.CategoryId from temp_table a
left join (select * from m_productcategory where MarketId = 58  and IsLeaf = 1 and SiteCode = 'VN') b on a.`Name` = b.`Name` and a.CombinationNameEn = b.CombinationNameEn
where b.CategoryId is not null 
) c on m.sku = c.sku and m.SiteCode = c.SiteCode
 set m.CategoryId = c.CategoryId,m.LastModifier = '0310类目更新'
where  m.CustomerId=1 AND m.MarketId=58 and m.SiteCode = 'VN' and (m.CategoryId is null or m.CategoryId = '') and c.sku is not null

kogan 类目刷新规则

按照业务提供的表格,进行数据刷新

将类目刷新到P_market_product表&

并在p_market_product_review中,将SKU刷新为审核通过

LastModifier记录:3月10日类目手动更新

附件
历史记录  
  1. 2023-03-10 11:53:26, 由 刘瀚泽 创建。
  2. 2023-03-10 13:41:09, 由 许瑞丰 指派给 朱思文。
  3. 2023-03-10 17:08:05, 由 朱思文 启动。
    修改了 实际开始,旧值为 "0000-00-00 00:00:00",新值为 "2023-03-10 17:08:00"。
    修改了 总计消耗,旧值为 "0",新值为 "1"。
    修改了 任务状态,旧值为 "wait",新值为 "doing"。
  4. 2023-03-10 17:12:57, 由 朱思文 完成。
    修改了 总计消耗,旧值为 "1",新值为 "2"。
    修改了 指派给 ,旧值为 "zhusiwen",新值为 "liuhanze"。
    修改了 实际完成,旧值为 "",新值为 "2023-03-10 17:12:09"。
    修改了 任务状态,旧值为 "doing",新值为 "done"。
    修改了 预计剩余,旧值为 "2",新值为 "0"。
    修改了 由谁完成,旧值为 "",新值为 "zhusiwen"。

    1.同步lazada类目

    2.同步kogan类目

  5. 2023-03-12 15:40:41, 由 刘瀚泽 关闭。
    修改了 任务状态,旧值为 "done",新值为 "closed"。
    修改了 指派给 ,旧值为 "liuhanze",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "liuhanze"。
    修改了 关闭时间,旧值为 "0000-00-00 00:00:00",新值为 "2023-03-12 15:40:41"。
    修改了 关闭原因,旧值为 "",新值为 "done"。
    已完成
所属迭代 技术研发中心 3月运维事项(2023年)
所属模块 /
相关需求 暂无
指派给 Closed 于 2023-03-12 15:40:41
任务类型 运维
任务标签 初始
开发组 有品开发组
任务状态 已关闭
进度 100%
优先级 P0
关键词
抄送给
由谁创建 刘瀚泽 于 2023-03-10 11:53:26
由谁完成 朱思文 于 2023-03-10 17:12:09
由谁取消 暂无
由谁关闭 刘瀚泽 于 2023-03-12 15:40:41
关闭原因 已完成
最后编辑 刘瀚泽 于 2023-03-12 15:40:41
团队 最初预计 总计消耗 预计剩余
工时信息
最初预计 2工时
总计消耗 2工时
预计剩余 0工时
预计开始 2023-03-10
实际开始 2023-03-10
截止日期 2023-03-10