Files
integral-shop/docs/com-byhlc112-data-imgration.md
2026-05-30 20:08:25 +08:00

62 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 公司名称:宝应宏煜春商贸
host ip: 39.97.236.112
## mysql数据库配置信息
datasource:
rds: rm-bp1a178eq62lxba9xbo.mysql.rds.aliyuncs.com
name: byhlc112
username: yangtangyoupin
password: 5Fn8eWrbYFtAhCZw
## 数据清理任务
- **数据范围**`wa_users.id` / `eb_user.uid` 保留名单:
`92801, 93011, 93032, 93073, 93076, 93078, 93094, 93120, 93136, 93147, 93155, 93185, 93193, 93216, 93218, 93248, 93284, 93287, 93290, 93295, 93297, 93301, 93305, 93306, 93307, 93315, 93318, 93321, 93322, 93323, 93325, 93327, 93328, 93329`
- 保留wa_users表中id在用户id数据范围的 ,删除其余用户数据
- 保留eb_user表中uid在用户id数据范围的 ,删除其余用户数据
- wa_order
清空wa_order表中数据
- wa_merchandise
从源数据dump文件中提取“created_at >= 2026-05-28”并且seller_id或buyer_id在用户id数据范围的寄售商品删除其余数据
(当前库表字段为 `user_id` 表示卖家,实现时按 `user_id` 与日期条件过滤。)
- wa_selfbonus_log
只保留 `user_id` 在用户id数据范围内的记录删除其余数据
- wa_sharebonus_log
只保留 `user_id` 在用户id数据范围内的记录删除其余数据
- wa_coupon_log
只保留 `user_id` 在用户id数据范围内的记录删除其余数据
- wa_withdraw
清空wa_withdraw表中数据
- eb_store_order
清空eb_store_order表中数据
- eb_user_integral_record
只保留用户在名单内的记录;表字段为 `uid`(与 `wa_users.id` / `eb_user.uid` 对应),实现按 `uid` 过滤。
## 执行结果
- 已于 **2026-05-30** 按当前保留名单执行清理并 `COMMIT`
- 结果:`wa_order``wa_withdraw``eb_store_order` 已清空。
- 保留后行数:
- `wa_users`32
- `eb_user`32
- `wa_selfbonus_log`1285
- `wa_sharebonus_log`1536
- `wa_coupon_log`180
- `eb_user_integral_record`1321
- `wa_merchandise`35
## 相关文件
- 新公司初始会员信息: '/Users/mac/Works26/miao-july/byhlc/新团队成员名单.xlsx'