1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
| -- 最近一周用户统计 mock 数据(2026-03-20 ~ 2026-03-26)
| -- 用途:给「统计-用户数据」页面提供最近 7 天的注册、活跃、会员、购课、观看趋势数据
| -- 说明:本脚本会补充 APP 用户、进入系统日志、会员订单、课程订单、直播场次和观看记录
|
| INSERT IGNORE INTO `tcm_app_user`
| (`id`, `nickname`, `phone`, `password`, `avatar`, `wechat_openid`, `wechat_nickname`, `wechat_avatar`, `wechat_bound_at`,
| `apple_user_identifier`, `apple_identity_subject`, `apple_bound_at`, `type`, `gender`, `age`, `intro`, `status`, `clinic_id`, `member_expire_at`, `deleted`, `created_at`, `updated_at`)
| VALUES
| (301, '李安然', '13800009001', NULL, 'https://example.com/avatar/app-user-301.png', 'wx_openid_301', '安然', 'https://example.com/avatar/wechat-301.png', '2026-03-20 09:10:00',
| NULL, NULL, NULL, 0, 0, 28, '最近开始关注养生课程。', 1, NULL, NULL, 0, '2026-03-20 09:00:00', '2026-03-20 09:00:00'),
| (302, '陈思远', '13800009002', NULL, 'https://example.com/avatar/app-user-302.png', 'wx_openid_302', '思远', 'https://example.com/avatar/wechat-302.png', '2026-03-21 10:25:00',
| NULL, NULL, NULL, 1, 1, 36, '诊所负责人,关注课程内容。', 1, 1, NULL, 0, '2026-03-21 10:00:00', '2026-03-21 10:00:00'),
| (303, '周雨桐', '13800009003', NULL, 'https://example.com/avatar/app-user-303.png', 'wx_openid_303', '雨桐', 'https://example.com/avatar/wechat-303.png', '2026-03-22 14:10:00',
| NULL, NULL, NULL, 0, 0, 31, '已经开通过月卡会员。', 1, NULL, '2026-05-15 23:59:59', 0, '2026-03-22 13:30:00', '2026-03-22 13:30:00'),
| (304, '王知夏', '13800009004', NULL, 'https://example.com/avatar/app-user-304.png', 'wx_openid_304', '知夏', 'https://example.com/avatar/wechat-304.png', '2026-03-23 11:25:00',
| NULL, NULL, NULL, 0, 1, 27, '偏好购买课程小节。', 1, NULL, '2026-06-30 23:59:59', 0, '2026-03-23 11:00:00', '2026-03-23 11:00:00'),
| (305, '赵景行', '13800009005', NULL, 'https://example.com/avatar/app-user-305.png', 'wx_openid_305', '景行', 'https://example.com/avatar/wechat-305.png', '2026-03-24 16:18:00',
| NULL, NULL, NULL, 1, 1, 40, '新注册的诊所用户。', 1, 1, NULL, 0, '2026-03-24 16:00:00', '2026-03-24 16:00:00'),
| (306, '许清禾', '13800009006', NULL, 'https://example.com/avatar/app-user-306.png', 'wx_openid_306', '清禾', 'https://example.com/avatar/wechat-306.png', '2026-03-25 09:22:00',
| NULL, NULL, NULL, 0, 0, 33, '季卡会员用户。', 1, NULL, '2026-07-31 23:59:59', 0, '2026-03-25 09:00:00', '2026-03-25 09:00:00'),
| (307, '孙书意', '13800009007', NULL, 'https://example.com/avatar/app-user-307.png', 'wx_openid_307', '书意', 'https://example.com/avatar/wechat-307.png', '2026-03-26 20:08:00',
| NULL, NULL, NULL, 0, 0, 25, '刚注册,主要浏览直播回放。', 1, NULL, NULL, 0, '2026-03-26 19:30:00', '2026-03-26 19:30:00');
|
| INSERT IGNORE INTO `tcm_live_session`
| (`id`, `live_course_id`, `start_time`, `video_url`, `base_reserve_count`, `base_watch_count`, `real_reserve_count`, `real_watch_count`,
| `reserve_convert_rate`, `completion_rate`, `effective_watch_rate`, `quiz_correct_count`, `points_issued`, `live_status`, `actual_start_time`, `actual_end_time`, `deleted`)
| VALUES
| (90001, 1, '2026-03-20 19:30:00', 'https://example.com/live/session-90001.mp4', 20, 30, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-20 19:32:00', '2026-03-20 20:25:00', 0),
| (90002, 1, '2026-03-21 19:30:00', 'https://example.com/live/session-90002.mp4', 18, 28, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-21 19:31:00', '2026-03-21 20:22:00', 0),
| (90003, 2, '2026-03-22 19:30:00', 'https://example.com/live/session-90003.mp4', 16, 24, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-22 19:35:00', '2026-03-22 20:28:00', 0),
| (90004, 2, '2026-03-23 19:30:00', 'https://example.com/live/session-90004.mp4', 14, 20, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-23 19:33:00', '2026-03-23 20:18:00', 0),
| (90005, 1, '2026-03-24 19:30:00', 'https://example.com/live/session-90005.mp4', 15, 21, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-24 19:30:00', '2026-03-24 20:20:00', 0),
| (90006, 2, '2026-03-25 19:30:00', 'https://example.com/live/session-90006.mp4', 13, 19, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-25 19:34:00', '2026-03-25 20:10:00', 0),
| (90007, 1, '2026-03-26 19:30:00', 'https://example.com/live/session-90007.mp4', 17, 26, 0, 0, 0.00, 0.00, 0.00, 0, 0, 2, '2026-03-26 19:31:00', '2026-03-26 20:26:00', 0);
|
| INSERT IGNORE INTO `tcm_app_user_entry_log`
| (`app_user_id`, `entry_time`, `deleted`)
| VALUES
| (301, '2026-03-20 09:05:00', 0),
| (301, '2026-03-20 21:10:00', 0),
| (302, '2026-03-21 10:20:00', 0),
| (303, '2026-03-22 09:00:00', 0),
| (303, '2026-03-22 20:10:00', 0),
| (304, '2026-03-23 11:20:00', 0),
| (304, '2026-03-23 21:30:00', 0),
| (305, '2026-03-24 16:12:00', 0),
| (303, '2026-03-24 20:08:00', 0),
| (306, '2026-03-25 09:18:00', 0),
| (304, '2026-03-25 19:45:00', 0),
| (307, '2026-03-26 19:35:00', 0),
| (306, '2026-03-26 20:40:00', 0),
| (303, '2026-03-26 21:15:00', 0);
|
| INSERT IGNORE INTO `tcm_member_purchase_order`
| (`order_no`, `app_user_id`, `user_nickname`, `user_phone`, `member_type`, `member_days`, `order_amount`,
| `payment_method`, `refund_amount`, `refund_remark`, `status`, `paid_at`, `refunded_at`, `cancelled_at`, `deleted`)
| VALUES
| ('MPO202603220101', 303, '周雨桐', '13800009003', 'MONTH_CARD', 30, 69.00,
| 'WECHAT', NULL, NULL, 'PAID', '2026-03-22 10:15:00', NULL, NULL, 0),
| ('MPO202603250101', 306, '许清禾', '13800009006', 'QUARTER_CARD', 90, 199.00,
| 'ALIPAY', NULL, NULL, 'PAID', '2026-03-25 10:40:00', NULL, NULL, 0),
| ('MPO202603260101', 304, '王知夏', '13800009004', 'MONTH_CARD', 30, 69.00,
| 'WECHAT', NULL, NULL, 'PAID', '2026-03-26 11:05:00', NULL, NULL, 0);
|
| INSERT IGNORE INTO `tcm_course_purchase_order`
| (`order_no`, `app_user_id`, `user_nickname`, `user_phone`, `course_type`, `purchase_target_type`, `course_id`,
| `course_video_id`, `product_name_snapshot`, `course_title_snapshot`, `chapter_name_snapshot`, `cover_img_snapshot`,
| `order_amount`, `payment_method`, `refund_amount`, `refund_remark`, `status`, `paid_at`, `refunded_at`, `cancelled_at`, `deleted`)
| VALUES
| ('CPO202603210101', 302, '陈思远', '13800009002', 'HEALTH_COURSE', 'COURSE', 1,
| NULL, '中医针灸资格证', '中医针灸资格证', NULL, 'https://example.com/health/course-1-cover.png',
| 299.00, 'ALIPAY', NULL, NULL, 'PAID', '2026-03-21 18:10:00', NULL, NULL, 0),
| ('CPO202603230101', 304, '王知夏', '13800009004', 'HEALTH_COURSE', 'COURSE_CHAPTER', 1,
| 1, '中医针灸资格证-方剂学', '中医针灸资格证', '方剂学', 'https://example.com/health/course-1-cover.png',
| 159.00, 'WECHAT', NULL, NULL, 'PAID', '2026-03-23 14:50:00', NULL, NULL, 0),
| ('CPO202603250101', 306, '许清禾', '13800009006', 'HEALTH_COURSE', 'COURSE', 1,
| NULL, '中医针灸资格证', '中医针灸资格证', NULL, 'https://example.com/health/course-1-cover.png',
| 259.00, 'ALIPAY', NULL, NULL, 'PAID', '2026-03-25 21:10:00', NULL, NULL, 0),
| ('CPO202603260101', 303, '周雨桐', '13800009003', 'HEALTH_COURSE', 'COURSE_CHAPTER', 1,
| 2, '中医针灸资格证-药剂学', '中医针灸资格证', '药剂学', 'https://example.com/health/course-1-cover.png',
| 129.00, 'WECHAT', NULL, NULL, 'PAID', '2026-03-26 15:30:00', NULL, NULL, 0);
|
| INSERT IGNORE INTO `tcm_live_watch_record`
| (`live_course_id`, `session_id`, `app_user_id`, `watch_start`, `watch_end`, `duration_seconds`, `is_completed`, `is_effective`)
| VALUES
| (1, 90001, 301, '2026-03-20 19:40:00', '2026-03-20 20:05:00', 1500, 0, 1),
| (1, 90001, 301, '2026-03-20 20:10:00', '2026-03-20 20:18:00', 480, 0, 1),
| (1, 90002, 302, '2026-03-21 19:38:00', '2026-03-21 20:12:00', 2040, 1, 1),
| (2, 90003, 303, '2026-03-22 19:45:00', '2026-03-22 20:16:00', 1860, 1, 1),
| (2, 90003, 303, '2026-03-22 20:20:00', '2026-03-22 20:26:00', 360, 0, 0),
| (2, 90004, 304, '2026-03-23 19:36:00', '2026-03-23 19:55:00', 1140, 0, 1),
| (1, 90005, 305, '2026-03-24 19:42:00', '2026-03-24 20:06:00', 1440, 0, 1),
| (1, 90005, 303, '2026-03-24 20:10:00', '2026-03-24 20:19:00', 540, 0, 0),
| (2, 90006, 306, '2026-03-25 19:40:00', '2026-03-25 20:08:00', 1680, 1, 1),
| (2, 90006, 304, '2026-03-25 20:15:00', '2026-03-25 20:22:00', 420, 0, 0),
| (1, 90007, 307, '2026-03-26 19:40:00', '2026-03-26 20:06:00', 1560, 0, 1),
| (1, 90007, 306, '2026-03-26 20:12:00', '2026-03-26 20:24:00', 720, 0, 1),
| (1, 90007, 303, '2026-03-26 20:25:00', '2026-03-26 20:28:00', 180, 0, 0);
|
|