任务描述

热数据条件:

1、FBA的Listing(不管是否出单):FBA状态字段的值为“FBA”

2、有品的Listing:来源渠道对应的销售员所属部门为有品的

3、人工刊登近半年Listing(不管是否出单): 1、上架方式非“自动刊登”“智能刊登”2、记录时间离现在小于半年时间   3、 关联导入 和 凤凰重刊算自动刊登

4、所有已出单Listing:渠道SKU表存在对应Listing的渠道SKU

5、渠道SKU表存在对应Listing的渠道SKU :Asin+国家相同,存在FBA的自发货Listing


二、新产生的Listing上架方式为下述7个时,Listing每天定时同步至冷数据库系统

上架方式:一键上架、草稿上架、表格上架、批量跟卖、复制上架、关联导入、凤凰重刊


一键上架、草稿上架、表格上架、批量跟卖这些上架方式的listing同步时, “是否热数据”字段值标记为是

关联导入、凤凰重刊这些上架方式的listing同步时, “是否热数据”字段值标记为否


三、每天定时跑listing数据,对符合冷数据条件的数据做逻辑删除标记,并同步状态至冷数据库系统标记 “是否热数据”字段值为否


=====================

开发要求:

1、在ZhcxkjErpWorker项目进行服务开发

2、服务需兼顾全量初始化迁移和后续日常迁移

3、热数据 获取思路,可参考如下SQL,适当进行性能优化改进。


--1、FBA的Listing(不管是否出单):FBA状态字段的值为“FBA”
select top 100 * from RB_Amazon_Product_Base (nolock) pb where pb.CustomerID=1 and pb.IsFBA=1 and pb.IsDelete=0
--2、有品的Listing:来源渠道对应的销售员所属部门为有品的
select top 100 * from RB_Amazon_Product_Base (nolock) pb where  pb.CustomerID=1 and   pb.IsDelete=0 and pb.OrderSourceID in (
select b.ID from RB_OrderSource (nolock) b
inner join RB_Admin (nolock) a   on a.id=b.SaleAdminID and a.CustomerID=b.CustomerID
where CHARINDEX('{500}',a.UserFullPath )>0 and a.IsActive=1 and isnull(a.IsLock,0)=0 and b.IsDelete=0 and b.IsActive=1
)
--3、近180天人工刊登(上架方式为:一键上架、草稿上架、表格上架、批量跟卖、复制上架)的Listing数据,不管Listing是否出单
select top 100 * from RB_Amazon_Product_Base (nolock) pb where pb.CustomerID=1 and  pb.IsDelete=0 and pb.OnShelfMode in  (1,2,3,5,7)
union
select top 100 * from RB_Amazon_Product_Base (nolock) pb where pb.CustomerID=1 and  pb.IsDelete=0 and pb.PublishTime>=dateadd(dd,-180, pb.PublishTime)
-- 4、所有已出单Listing:渠道SKU表存在对应Listing的渠道SKU
select top 100 * from RB_Amazon_Product_Base (nolock) pb
inner join RB_Product_OrderSourceSKU(nolock) ss on ss.CustomerID=pb.CustomerID and ss.OrderSourceID=pb.OrderSourceID and ss.OrderSourceSKU=pb.OrderSourceSKU
where pb.CustomerID=1 and  pb.IsDelete=0 and ss.isDelete=0
--5、相同Asin+国家的Listing数据,只要存在一条Listing是FBA,这组数据全部都归属于热数据
select top 100 * from RB_Amazon_Product_Base (nolock) prb where prb.CustomerID=1 and  prb.IsDelete=0  and
exists (
select pb.ASINorItemID,pb.OrderSourceCountry,
sum(
case when isnull(pb.Isfba,0)=1 then 1 else 0 end
) fbaCount,
sum(
case when isnull(pb.Isfba,0)=0 then 1 else 0 end
) nofbaCount
from RB_Amazon_Product_Base (nolock) pb
where  pb.CustomerID=1 and pb.IsDelete=0 and pb.PublishTime>='2022-09-29 00:00:00' and pb.ASINorItemID is not null and  pb.ASINorItemID='B09K3P5C2S'
and pb.OrderSourceCountry=prb.OrderSourceCountry and pb.ASINorItemID=prb.ASINorItemID
group by pb.ASINorItemID,pb.OrderSourceCountry
having sum(
case when isnull(pb.Isfba,0)=1 then 1 else 0 end
)>0 and sum(
case when isnull(pb.Isfba,0)=0 then 1 else 0 end
)>0
)


需求描述

热数据条件:

      1、FBA的Listing(不管是否出单):FBA状态字段的值为“FBA”

      2、有品的Listing:来源渠道对应的销售员所属部门为有品的

      3、人工刊登近半年Listing(不管是否出单):  1、上架方式非“自动刊登”“智能刊登”2、记录时间离现在小于半年时间   3、 关联导入 和 凤凰重刊算自动刊登

      4、所有已出单Listing:渠道SKU表存在对应Listing的渠道SKU

      5、渠道SKU表存在对应Listing的渠道SKU :Asin+国家相同,存在FBA的自发货Listing


二、新产生的Listing上架方式为下述7个时,Listing每天定时同步至冷数据库系统

上架方式:一键上架、草稿上架、表格上架、批量跟卖、复制上架、关联导入、凤凰重刊


一键上架、草稿上架、表格上架、批量跟卖这些上架方式的listing同步时, “是否热数据”字段值标记为是

关联导入、凤凰重刊这些上架方式的listing同步时, “是否热数据”字段值标记为否


三、每天定时跑listing数据,对符合冷数据条件的数据做逻辑删除标记,并同步状态至冷数据库系统标记 “是否热数据”字段值为否


验收标准
暂无
历史记录  
  1. 2022-09-30 09:56:29, 由 王翔宇 创建。
  2. 2022-10-24 11:23:09, 由 冯名明 完成。
    修改了 总计消耗,旧值为 "0",新值为 "48"。
    修改了 实际完成,旧值为 "",新值为 "2022-10-24 11:18:58"。
    修改了 任务状态,旧值为 "wait",新值为 "done"。
    修改了 实际开始,旧值为 "0000-00-00 00:00:00",新值为 "2022-10-24 11:23:09"。
    修改了 预计剩余,旧值为 "48",新值为 "0"。
    修改了 由谁完成,旧值为 "",新值为 "fengmingming"。

    同步店铺ID:5018   名称:亚马逊销售B部  的数据

  3. 2023-10-31 14:58:13, 由 周杰 关闭。
    修改了 任务状态,旧值为 "done",新值为 "closed"。
    修改了 指派给 ,旧值为 "fengmingming",新值为 "closed"。
    修改了 由谁关闭,旧值为 "",新值为 "zhoujie"。
    修改了 关闭时间,旧值为 "0000-00-00 00:00:00",新值为 "2023-10-31 14:58:13"。
    修改了 关闭原因,旧值为 "",新值为 "done"。
所属迭代 亚马逊Listing迁移 V1.0
所属模块 /
相关需求 ERP Listing数据同步冷数据库系统
指派给 Closed 于 2023-10-31 14:58:13
任务类型 后端
任务标签 初始
开发组
任务状态 已关闭
进度 100%
优先级 P2
关键词
抄送给
由谁创建 王翔宇 于 2022-09-30 09:56:29
由谁完成 冯名明 于 2022-10-24 11:18:58
由谁取消 暂无
由谁关闭 周杰 于 2023-10-31 14:58:13
关闭原因 已完成
最后编辑 周杰 于 2023-10-31 14:58:13
团队 最初预计 总计消耗 预计剩余
工时信息
最初预计 48工时
总计消耗 48工时
预计剩余 0工时
预计开始 0000-00-00
实际开始 2022-10-24
截止日期 0000-00-00