任务背景:
allegro listing 当前系统在线数量比API在线数量多了近75万,需要进行处理数据

任务内容:
处理逻辑:
将m_allegro_listing 表中onlinestatus=1且更新时间在近一个月前的数据,统一插入到m_allegro_listing_productid 表中,做一次数据同步
插入的数据,标记一下creater 信息,creater='2月8日同步数据'
注意:
关联查询需要同步的数据处理量在150W+

任务背景:
allegro listing 当前系统在线数量比API在线数量多了近75万,需要进行处理数据

任务内容:
处理逻辑:
将m_allegro_listing 表中onlinestatus=1且更新时间在近一个月前的数据,统一插入到m_allegro_listing_productid 表中,做一次数据同步
插入的数据,标记一下creater 信息,creater='2月8日同步数据'
注意:
关联查询需要同步的数据处理量在150W+

001-
001+ 任务背景:
002+ allegro listing 当前系统在线数量比API在线数量多了近75万,需要进行处理数据
003+
004+ 任务内容:
005+ 处理逻辑:
006+ 将m_allegro_listing 表中onlinestatus=1且更新时间在近一个月前的数据,统一插入到m_allegro_listing_productid 表中,做一次数据同步
007+ 插入的数据,标记一下creater 信息,creater='2月8日同步数据'
008+
001-
001+ <p><strong><span style="font-size:16px;">任务背景:</span></strong></p>
002+ <p><strong><span style="font-size:16px;"><span style="font-size:14px;">allegro listing 当前系统在线数量比API在线数量多了近75万,需要进行处理数据</span><br /></span></strong></p>
003+ <p><strong><span style="font-size:16px;"><img src="{241217.png}" alt="" /><br /></span></strong></p>
004+ <p><strong><span style="font-size:16px;">任务内容:</span></strong></p>
005+ <p><strong><span style="font-size:14px;">处理逻辑:</span></strong></p>
006+ <p><strong><span style="font-size:16px;"><span style="font-size:14px;">将</span><span style="font-size:14px;">m_allegro_listing 表中onlinestatus=1且更新时间<span style="color:#E53333;">在近一个月前</span>的数据,统一插入到</span><span style="font-size:14px;">m_allegro_listing_productid 表中,做一次数据同步</span></span></strong></p>
007+ <p><strong><span style="font-size:14px;">插入的数据,标记一下creater 信息,creater='2月8日同步数据'</span></strong></p>
008+ <p><br /></p>
001-allegro 在线数据状态修复
001+ allegro 长时间未更新的在线数状态修复
001-修改了 任务描述,区别为:allegro 在线数据状态修复
001+ allegro 长时间未更新的在线数状态修复
003-<img src="/zentao/file-read-241217.png" alt="" />
003+
008-
008+
009+ 注意:
010+ 关联查询需要同步的数据处理量在150W+
011+
012+
003-<p><strong><span style="font-size:16px;"><img src="/zentao/file-read-241217.png" alt="" /><br /></span></strong></p>
003+ <p><strong><span style="font-size:16px;"><img src="{241217.png}" alt="" /><br /></span></strong></p>
008-<p><br /></p>
008+ <p><strong><span style="font-size:14px;"><br /></span></strong></p>
009+ <p><strong><span style="font-size:14px;">注意:</span></strong></p>
010+ <p><strong><span style="font-size:14px;">关联查询需要同步的数据处理量在150W+</span></strong></p>
011+ <p><strong><span style="font-size:14px;"><img src="{241219.png}" alt="" /><br /></span></strong></p>
012+ <p><br /></p>
003-<img src="/zentao/file-read-241217.png" alt="" />
003+
011-<img src="/zentao/file-read-241219.png" alt="" />
011+
003-<p><strong><span style="font-size:16px;"><img src="/zentao/file-read-241217.png" alt="" /><br /></span></strong></p>
003+ <p><strong><span style="font-size:16px;"><img src="{241217.png}" alt="" /><br /></span></strong></p>
011-<p><strong><span style="font-size:14px;"><img src="/zentao/file-read-241219.png" alt="" /><br /></span></strong></p>
011+ <p><strong><span style="font-size:14px;"><img src="{241219.png}" alt="" /><br /></span></strong></p>
昨日执行数据
同步成功:1673962
同步失败:194853
检查发现:
(1)同步失败的数据,及产品已不存在,未正确在allegro listing中标记
如 offerID:11129283923
SELECT * FROM `m_allegro_listing_productid` WHERE CustomerId=1 AND Date=20230209 AND ProductId='11129283923'
已经同步到,并标记已删除

但在allegro listing中,未改OnlineStatus为已删除3,并且更新时间没有更新,导致数据统计出错!

当前数据差异还存在73.76万

需要找到产生错误数据的原因
查询出问题后,将如下SQL,改执行状态为0,再执行一次同步!
SELECT * FROM `m_allegro_listing_productid` WHERE CustomerId=1 AND Date=20230209
003-<img src="/zentao/file-read-241217.png" alt="" />
003+
011-<img src="/zentao/file-read-241219.png" alt="" />
011+
003-<p><strong><span style="font-size:16px;"><img src="/zentao/file-read-241217.png" alt="" /><br /></span></strong></p>
003+ <p><strong><span style="font-size:16px;"><img src="{241217.png}" alt="" /><br /></span></strong></p>
011-<p><strong><span style="font-size:14px;"><img src="/zentao/file-read-241219.png" alt="" /><br /></span></strong></p>
011+ <p><strong><span style="font-size:14px;"><img src="{241219.png}" alt="" /><br /></span></strong></p>
003-<img src="/zentao/file-read-241217.png" alt="" />
003+
011-<img src="/zentao/file-read-241219.png" alt="" />
011+
003-<p><strong><span style="font-size:16px;"><img src="/zentao/file-read-241217.png" alt="" /><br /></span></strong></p>
003+ <p><strong><span style="font-size:16px;"><img src="{241217.png}" alt="" /><br /></span></strong></p>
011-<p><strong><span style="font-size:14px;"><img src="/zentao/file-read-241219.png" alt="" /><br /></span></strong></p>
011+ <p><strong><span style="font-size:14px;"><img src="{241219.png}" alt="" /><br /></span></strong></p>
任务处理步骤!
(1)m_allegro_listing_productid表中已同步且同步状态=2 且failure log like'Offer not found' 的数据,与m_allegro_listing中的数据做关联查询
将m_allegro_listing表中未正确改OnlineStatus为已删除3的数据,重新标记为已删除
(2)开发代码,当m_allegro_listing_productid同步到数据,同步状态=2 且failure log like'Offer not found' 的数据,直接改listing表状态,标记为已删除3
(3)修复问题并发布后,将如下SQL,改执行状态为0,再执行一次同步!
SELECT * FROM `m_allegro_listing_productid` WHERE CustomerId=1 AND Date=20230209
步骤1 状态修复SQL执行中

步骤2 程序开发完成
| 所属迭代 | 技术研发中心 2月运维事项(2023年) |
|---|---|
| 所属模块 | / |
| 相关需求 | 暂无 |
| 指派给 | Closed 于 2023-03-12 15:40:25 |
| 任务类型 | 运维 |
| 任务标签 | 初始 |
| 开发组 | 有品开发组 |
| 任务状态 | 已关闭 |
| 进度 | 100% |
| 优先级 | P1 |
| 关键词 | |
| 抄送给 |
| 由谁创建 | 刘瀚泽 于 2023-02-07 19:25:53 |
|---|---|
| 由谁完成 | 韦思成 于 2023-02-13 19:13:37 |
| 由谁取消 | 暂无 |
| 由谁关闭 | 刘瀚泽 于 2023-03-12 15:40:25 |
| 关闭原因 | 已完成 |
| 最后编辑 | 刘瀚泽 于 2023-03-12 15:40:25 |
| 团队 | 最初预计 | 总计消耗 | 预计剩余 |
|---|
| 最初预计 | 6工时 |
|---|---|
| 总计消耗 | 6工时 |
| 预计剩余 | 0工时 |
| 预计开始 | 0000-00-00 |
| 实际开始 | 2023-02-09 |
| 截止日期 | 0000-00-00 |
--执行如下SQL:
INSERT IGNORE INTO m_allegro_listing_productid(CustomerId,OrderSourceId,ProductId,SellerSku,`Status`,`FailureLog`,Date,Time,CreatorId,Creator,CreationTime,LastModifierId,LastModifier,LastModificationTime)
select CustomerId,OrderSourceId,ProductId,SellerSku,0,'',20230209, NOW(),0,'2月9日同步数据',NOW(), 0,'2月9日同步数据',NOW() from m_allegro_listingwhere CustomerId=1 and OnlineStatus=1 and LastModificationTime<'2023-01-09'