任务背景:
allegro 因系统问题导致的重刊下架成功,系统刊登失败数据,需恢复在线
-- allegro重新刊登失败的产品,推送到中间表恢复已上架
insert IGNORE into m_allegro_listing_update (CustomerId,OrderSourceId,OfferId,OrginalHandingTime,HandingTime,Status,Date,CreatorId,Creator,CreationTime,LastModifierId,LastModifier,LastModificationTime)
select CustomerId,OrderSourceId,ItemId,'','',0,20221124,0,'系统1124',NOW(),0,'系统1124',NOW() from ap_autopublish_allegro_queue where CustomerId=1 and MarketId=67 and Date>20221115 and Date<=20221124 and time<'2022-11-24 16:00:00' AND PublishType=3 and Status='failure'
-- 下架的lsting重新入队列上架 (重刊队列成功但无平台ID的)---数据执行时间,修改到当前时间
insert IGNORE into m_allegro_listing_update (CustomerId,OrderSourceId,OfferId,OrginalHandingTime,HandingTime,Status,Date,CreatorId,Creator,CreationTime,LastModifierId,LastModifier,LastModificationTime)
select CustomerId,OrderSourceId,ItemId,'','',0,20221124,0,'系统1124',NOW(),0,'系统1124',NOW() from pp_phoenixplan_allegro_queue where CustomerId=1 and MarketId=67 and Date>20221115 and Date<=20221124 and time<'2022-11-24 16:00:00' and StrategyId>0 and StrategyType=2 and `Status`='success' and RePublishItemId is null;
-- 下架的lsting重新入队列上架(重刊队列失败1)
insert IGNORE into m_allegro_listing_update (CustomerId,OrderSourceId,OfferId,OrginalHandingTime,HandingTime,Status,Date,CreatorId,Creator,CreationTime,LastModifierId,LastModifier,LastModificationTime)
select CustomerId,OrderSourceId,ItemId,'','',0,20221124,0,'系统1124',NOW(),0,'系统1124',NOW() from pp_phoenixplan_allegro_queue where CustomerId=1 and MarketId=67 and Date>20221115 and Date<=20221124
and time<'2022-11-24 16:00:00' and StrategyId>0 and StrategyType=2 and `Status`='failure' and FailureReason='下架原Listing失败:Command with the given id but with different content is already registered.,';
-- 下架的lsting重新入队列上架(重刊队列失败2)
insert IGNORE into m_allegro_listing_update (CustomerId,OrderSourceId,OfferId,OrginalHandingTime,HandingTime,Status,Date,CreatorId,Creator,CreationTime,LastModifierId,LastModifier,LastModificationTime)
select CustomerId,OrderSourceId,ItemId,'','',0,20221124,0,'系统1124',NOW(),0,'系统1124',NOW() from pp_phoenixplan_allegro_queue where CustomerId=1 and MarketId=67 and Date>20221115 and Date<=20221124
and time<'2022-11-24 16:00:00' and StrategyId>0 and StrategyType=2 and `Status`='failure' and FailureReason='标题/描述过滤敏感词不通过';
-- 下架的lsting重新入队列上架(重刊队列失败3)
insert IGNORE into m_allegro_listing_update (CustomerId,OrderSourceId,OfferId,OrginalHandingTime,HandingTime,Status,Date,CreatorId,Creator,CreationTime,LastModifierId,LastModifier,LastModificationTime)
select CustomerId,OrderSourceId,ItemId,'','',0,20221124,0,'系统1124',NOW(),0,'系统1124',NOW() from pp_phoenixplan_allegro_queue where CustomerId=1 and MarketId=67 and Date>20221115 and Date<=20221124
and time<'2022-11-24 16:00:00' and StrategyId>0 and StrategyType=2 and `Status`='failure' and FailureReason='产品描述为空';