Files
junhong_cmp_fiber/docs/verification/add-operations-reports-verification.md
break 5e78809b93
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 15m33s
feat(运营报表): AUG26-015 设备激活与套餐续费日报快照、查询趋势与受控导出
- 新增成对迁移 000231 与三张快照表:日级头行、设备粒度激活行、到期事件粒度续费行,以快照日期为唯一键
- 新增每日 03:30(Asia/Shanghai)日报快照生成任务与幂等整日替换,失败重试沿用同一目标日
- 新增六条受控入口:两张报表的汇总、日/月趋势与受控导出,配套查询层只读快照事实
- 新增 operations_activation 与 operations_renewal 两个导出场景,创建期冻结筛选与可见店铺范围、派发期冻结表头、执行期只按冻结值复核资格
- 采购数量口径按系统内未删除设备数实施并在 PRD 标注,附实测差额依据
- 同步证据链 requirement-evidence.json 与入口能力矩阵、ARCHITECTURE 与验证记录
- 归档 change add-operations-reports 并新建主 Spec openspec/specs/operations-report/spec.md
2026-09-18 09:42:28 +08:00

950 lines
93 KiB
Markdown
Raw 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.
# add-operations-reports 验证记录(原始命令与原始输出)
本文件只记录**真实执行过的命令与原始输出**,按场景一段;每段给出命令原文、原始响应(含 HTTP 状态行)/原始 SQL 结果与退出码,不做二次整理、不写人工判定的 PASS 行。
执行环境:`junhong_cmp_test` PostgreSQL远端 `cxd.whcxd.cn:16159`,迁移版本 231+ 测试 Redis`JUNHONG_REDIS_DB=6`,依据 ENG-TEST-001+ 本机真实 `cmd/api``cmd/worker``JUNHONG_WORKER_ROLE=consumer`,只消费队列、不启动单例调度)+ 本地假 S3`127.0.0.1:9001`承接导出产物避免访问真实对象存储。fixture 全部带 `AUG26015` 标记,采集完成后全部删除(见末尾收尾段)。
快照日2026-09-16 / 2026-09-17 / 2026-09-18fixture 设备 created_at = 2026-09-01另有一台 `AUG26015-G` created_at = 2026-09-17 02:00 用于 as-of 断言)。
## B2同日亚日区间不得 panic 且不得让该日入选(修复后实测)
原始文件:`/tmp/au26015/raw/41_b2_subday_and_regression.txt`
```
# 命令
psql: 手工插入的 fixture 头行仅用于本次查询路径验证2026-09-18 采购=6 激活=4 在网=3 活跃=2 用量MB=1024.00 到期=1 续费=0
head=2026-09-18 采购=6 激活=4
# B2 亚日区间start=2026-09-18T09:00+08 end=2026-09-18T18:00+08同日、起点晚于该日零点 ⇒ 该日不得入选,区间内无命中快照日)
# 命令
curl -sS -i GET http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-18T09:00:00+08:00&end_time=2026-09-18T18:00:00+08:00
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:15:59 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 177
X-Request-Id: 3e0ec0c5-81ca-438f-ad11-b7b3f4a01b84
{"code":0,"data":{"has_snapshot":false,"snapshot_dates":[],"group_by":"","group_name":"全部","totals":null,"items":[]},"msg":"success","timestamp":"2026-09-17T20:16:00+08:00"}
# curl 退出码
0
# 命令
curl -sS -i GET http://127.0.0.1:3000/api/admin/operations-reports/package-renewal-summary?start_time=2026-09-18T09:00:00+08:00&end_time=2026-09-18T18:00:00+08:00B2 报告的 panic 点RenewalSummary days[0]
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:15:59 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 177
X-Request-Id: 69ef6a70-12c5-4707-bacb-6726963495b4
{"code":0,"data":{"has_snapshot":false,"snapshot_dates":[],"group_by":"","group_name":"全部","totals":null,"items":[]},"msg":"success","timestamp":"2026-09-17T20:16:00+08:00"}
# curl 退出码
0
# 跨日回归start=end=2026-09-18T00:00+08该日入选取该日头行
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:15:59 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 824
X-Request-Id: aa2ef708-e896-41e4-9e03-d293d25474ce
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-18"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":6,"activated_device_count":4,"activation_rate":0.67,"new_activated_device_count":null,"online_device_count":3,"active_device_count":2,"total_real_traffic_gb":1,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.55,"forecast_average_excluding_zero_gb":0.83},"items":[{"group_value":"全部","purchased_device_count":6,"activated_device_count":4,"activation_rate":0.67,"new_activated_device_count":null,"online_device_count":3,"active_device_count":2,"total_real_traffic_gb":1,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.55,"forecast_average_excluding_zero_gb":0.83}]},"msg":"success","timestamp":"2026-09-17T20:16:00+08:00"}
# 退出码
0
```
## 导出四段3134原始证据受控端点 / 通用入口+代理 / 执行期账号类型复核 / 冻结范围
本轮用真实 API + 真实 Workerconsumer 角色)+ 真实导出流水线采集,存储端点指向本地假 S3`127.0.0.1:9001``/tmp/au26015/raw/objects/`)以避免访问真实对象存储。
## 导出四段3134第二轮产物行级内容假 S3 GET 语义修正后)
(第一轮导出草稿小节已整段删除:其中的失败 SQL 与受占位 XML 污染的 CSV 没有可核对的原始文件支撑,仅保留本节的正式证据;被删内容的原始文件已随工作目录清理,不再引用。)
本轮把本地假 S3 的 GET/HEAD 修为「原样返回已存对象字节」(不再写占位 XML随后重跑导出取证。
## A-1 受控端点创建导出平台range=2026-09-16 当日零点闭区间group_by=device_name
原始文件:`/tmp/au26015/raw/50a_create_grouped.txt`
```
# 命令
curl -sS -i -X POST 'http://127.0.0.1:3000/api/admin/operations-reports/activation-summary/export' -H 'Content-Type: application/json' -H 'Authorization: Bearer <token>' -d '{"format":"csv","start_time":"2026-09-16T00:00:00+08:00","end_time":"2026-09-16T00:00:00+08:00","group_by":"device_name"}'
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:22:51 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 218
X-Request-Id: 3320ac18-a959-40a5-a5b1-e3f4c5a60fdd
{"code":0,"data":{"task_id":80,"task_no":"EXP-20260917-660000","status":1,"status_name":"待处理","message":"导出任务创建成功,系统将异步处理"},"msg":"success","timestamp":"2026-09-17T20:22:52+08:00"}
# curl 退出码
0
```
## A-2 同一筛选的页面汇总原始响应 + 任务行(冻结筛选/表头/行数/产物 key
原始文件:`/tmp/au26015/raw/50a_group_compare.txt`
```
# 命令
curl -sS GET .../activation-summary?start_time=2026-09-16T00:00:00+08:00&end_time=2026-09-16T00:00:00+08:00&group_by=device_name (原始响应体)
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"device_name","group_name":"设备名称","totals":{"group_value":"全部","purchased_device_count":6,"activated_device_count":4,"activation_rate":0.67,"new_activated_device_count":4,"online_device_count":3,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":0.35,"forecast_average_including_zero_gb":0.66,"forecast_average_excluding_zero_gb":1.97},"items":[{"group_value":"三贴MiFi","purchased_device_count":3,"activated_device_count":1,"activation_rate":0.33,"new_activated_device_count":null,"online_device_count":1,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":1.05,"forecast_average_including_zero_gb":1.97,"forecast_average_excluding_zero_gb":1.97},{"group_value":"三贴转双贴MiFi","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null},{"group_value":"带线充电宝","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},{"group_value":"未设置","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null}]},"msg":"success","timestamp":"2026-09-17T20:23:01+08:00"}
# 退出码
0
task80 status=3 total_rows=5 file_key=exports/2026/09/17/fbd1811c-91a6-4374-89a1-551d954e9854.csv headers=["设备名称", "采购数量", "累计激活数", "激活率", "新增激活数", "累计在网数", "活跃用户数", "累计用量(GB)", "单用户卡均(GB)", "含零预测卡均(GB)", "不含零预测卡均(GB)"] filters={"end_time": "2026-09-15T16:00:00Z", "group_by": "device_name", "start_time": "2026-09-15T16:00:00Z"}
```
## A/B/C-3 产物全文(最终 CSV + 分片 + 对象请求日志):逐行逐列对照与「无文字总结」
原始文件:`/tmp/au26015/raw/50b_product_full.txt`
```
# 命令
cat /tmp/au26015/raw/objects/*.csv真实导出流水线写入本地假 S3 的最终产物全文)
--- cmp_exports_2026_09_17_fbd1811c-91a6-4374-89a1-551d954e9854.csv (410 字节, 6 行)
设备名称,采购数量,累计激活数,激活率,新增激活数,累计在网数,活跃用户数,累计用量(GB),单用户卡均(GB),含零预测卡均(GB),不含零预测卡均(GB)
三贴MiFi,3,1,0.33,-,1,1,1.05,1.05,1.97,1.97
三贴转双贴MiFi,1,1,1.00,-,1,0,0.00,0.00,0.00,-
带线充电宝,1,1,1.00,-,0,0,0.00,-,-,-
未设置,1,1,1.00,-,1,0,0.00,0.00,0.00,-
合计,6,4,0.67,4,3,1,1.05,0.35,0.66,1.97
# 命令
cat /tmp/au26015/raw/objects/*.shard分片产物全文
--- cmp_exports_2026_09_17_4e5631ba-cb83-4358-b72c-f6e54b206ef5.shard (224 字节)
三贴MiFi,3,1,0.33,-,1,1,1.05,1.05,1.97,1.97
三贴转双贴MiFi,1,1,1.00,-,1,0,0.00,0.00,0.00,-
带线充电宝,1,1,1.00,-,0,0,0.00,-,-,-
未设置,1,1,1.00,-,1,0,0.00,0.00,0.00,-
合计,6,4,0.67,4,3,1,1.05,0.35,0.66,1.97
# 命令
cat /tmp/au26015/raw/objects/_requests.log对象存储请求日志
PUT /cmp/exports/2026/09/17/4e5631ba-cb83-4358-b72c-f6e54b206ef5.shard bytes=224 action=store
GET /cmp/exports/2026/09/17/4e5631ba-cb83-4358-b72c-f6e54b206ef5.shard bytes=224 action=read
PUT /cmp/exports/2026/09/17/fbd1811c-91a6-4374-89a1-551d954e9854.csv bytes=410 action=store
# 退出码
0
```
## D 分母为零写「-」:零分母分组 + 接口 null零采购日的导出任务实际失败无产物
原始文件:`/tmp/au26015/raw/50d_zero_denominator.txt`
```
# 命令
curl -sS GET .../activation-summary?start_time=2026-09-15T00:00:00+08:00&end_time=2026-09-15T00:00:00+08:00 (原始响应体,采购为零)
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-15"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":0,"activated_device_count":0,"activation_rate":null,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},"items":[{"group_value":"全部","purchased_device_count":0,"activated_device_count":0,"activation_rate":null,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null}]},"msg":"success","timestamp":"2026-09-17T20:23:12+08:00"}
# 命令
cat 该导出产物全文
total 24
-rw-r--r--@ 1 break wheel 279 Sep 17 20:22 _requests.log
-rw-r--r--@ 1 break wheel 224 Sep 17 20:22 cmp_exports_2026_09_17_4e5631ba-cb83-4358-b72c-f6e54b206ef5.shard
-rw-r--r--@ 1 break wheel 410 Sep 17 20:22 cmp_exports_2026_09_17_fbd1811c-91a6-4374-89a1-551d954e9854.csv
cat: /tmp/au26015/raw/objects/: Is a directory
task81 status=4 total_rows=2 file_key=(空)
# 退出码
0
```
> 如实说明D 段零采购快照日2026-09-15的**导出任务实际失败**(任务行 `status=4`、`file_key` 为空、无产物对象),因此该日**没有**产物可比。本文档中「分母为零写「-」」的证据由两部分共同支撑:① 09-16 产物内零分母分组的卡均/预测卡均列为 `-`(见 A/B/C-3 段产物全文,如 `带线充电宝` 行三列为 `-`);② 该零采购日接口同筛选返回 `null`(本段响应体)。两者均为主 Spec「分母为零时接口返回空、导出写作「-」」的可观察证据,但**不**存在「零采购日产物写「-」」的对照。
## E 冻结范围与执行期读取范围对照(两个不同冻结区间各自独立)
原始文件:`/tmp/au26015/raw/50e_scope_frozen.txt`
```
# 命令
psql: 两个任务各自的冻结筛选/冻结范围/行数/产物;两个不同的冻结区间互不影响
task80 filters={"end_time": "2026-09-15T16:00:00Z", "group_by": "device_name", "start_time": "2026-09-15T16:00:00Z"} scope=[] headers=["设备名称", "采购数量", "累计激活数", "激活率", "新增激活数", "累计在网数", "活跃用户数", "累计用量(GB)", "单用户卡均(GB)", "含零预测卡均(GB)", "不含零预测卡均(GB)"] status=3 total_rows=5 file_key=exports/2026/09/17/fbd1811c-91a6-4374-89a1-551d954e9854.csv
task82 filters={"end_time": "2026-09-16T16:00:00Z", "group_by": "device_name", "start_time": "2026-09-16T16:00:00Z"} scope=[] headers=["设备名称", "采购数量", "累计激活数", "激活率", "新增激活数", "累计在网数", "活跃用户数", "累计用量(GB)", "单用户卡均(GB)", "含零预测卡均(GB)", "不含零预测卡均(GB)"] status=3 total_rows=5 file_key=exports/2026/09/17/482d3012-d5b2-40a4-8bfc-143d63841734.csv
task80 shard_planned=5
task82 shard_planned=5
# 两个区间的汇总行数(页面)与导出总行数对照
09-16 分组行数(页面 items=4
09-17 分组行数(页面 items=4
# 产物行数(导出 CSV 除表头外的行数)
/tmp/au26015/harness/run6.sh: line 182: /tmp/au26015/raw/objects/exports_2026_09_17_fbd1811c-91a6-4374-89a1-551d954e9854.csv: No such file or directory
task80: 0 行(含合计行)
/tmp/au26015/harness/run6.sh: line 182: /tmp/au26015/raw/objects/exports_2026_09_17_482d3012-d5b2-40a4-8bfc-143d63841734.csv: No such file or directory
task82: 0 行(含合计行)
# 退出码
0
```
## E-2 「创建后权限变化」变更前后行数对照的构造尝试与结果
原始文件:`/tmp/au26015/raw/50f_permission_change_attempt.txt`
> 注意:原始文件 `50f_permission_change_attempt.txt` 含非 UTF-8 字节markdown 无法逐字承载下表为该文件的十六进制转义呈现raw 文件本身未做任何修改)。
> 注意:原始文件 `50f_permission_change_attempt.txt` 含非 UTF-8 字节markdown 无法逐字承载以下为该文件的十六进制转义呈现raw 文件未做任何修改)。
```
00000000: 23 20 e5 91 bd e4 bb a4 0a 70 73 71 6c 3a 20 55 # .......psql: U
00000010: 50 44 41 54 45 20 74 62 5f 65 78 70 6f 72 74 5f PDATE tb_export_
00000020: 74 61 73 6b 20 53 45 54 20 63 72 65 61 74 6f 72 task SET creator
00000030: 5f 75 73 65 72 5f 74 79 70 65 3d 33 20 57 48 45 _user_type=3 WHE
00000040: 52 45 20 69 64 3d bc 88 e5 af b9 e5 b7 b2 e5 ae RE id=..........
00000050: 8c e6 88 90 e4 bb bb e5 8a a1 e6 94 b9 e5 86 bb ................
00000060: e7 bb 93 e7 b1 bb e5 9e 8b ef bc 8c e6 9e 84 e9 ................
00000070: 80 a0 e5 af b9 e7 85 a7 e5 b0 9d e8 af 95 ef bc ................
00000080: 89 0a 74 61 73 6b 38 32 20 63 72 65 61 74 6f 72 ..task82 creator
00000090: 5f 75 73 65 72 5f 74 79 70 65 3d 33 20 73 74 61 _user_type=3 sta
000000a0: 74 75 73 3d 33 20 74 6f 74 61 6c 5f 72 6f 77 73 tus=3 total_rows
000000b0: 3d 35 20 66 69 6c 65 5f 6b 65 79 3d 65 78 70 6f =5 file_key=expo
000000c0: 72 74 73 2f 32 30 32 36 2f 30 39 2f 31 37 2f 34 rts/2026/09/17/4
000000d0: 38 32 64 33 30 31 32 2d 64 35 62 32 2d 34 30 61 82d3012-d5b2-40a
000000e0: 34 2d 38 62 66 63 2d 31 34 33 64 36 33 38 34 31 4-8bfc-143d63841
000000f0: 37 33 34 2e 63 73 76 20 65 72 72 6f 72 5f 6d 65 734.csv error_me
00000100: 73 73 61 67 65 3d 0a 23 20 e5 86 8d e6 ac a1 e6 ssage=.# .......
00000110: 89 a7 e8 a1 8c e5 90 8c e4 b8 80 e4 bb bb e5 8a ................
00000120: a1 ef bc 88 e7 bb 8f e9 98 9f e5 88 97 e9 87 8d ................
00000130: e6 8a 95 ef bc 89 e5 90 8e e7 9a 84 e5 8e 9f e5 ................
00000140: a7 8b e4 bb bb e5 8a a1 e8 a1 8c 0a 2f 74 6d 70 ............/tmp
00000150: 2f 61 75 32 36 30 31 35 2f 68 61 72 6e 65 73 73 /au26015/harness
00000160: 2f 72 75 6e 36 2e 73 68 3a 20 6c 69 6e 65 20 31 /run6.sh: line 1
00000170: 38 37 3a 20 2f 74 6d 70 2f 61 75 32 36 30 31 35 87: /tmp/au26015
00000180: 2f 72 61 77 2f 35 30 66 5f 62 65 66 6f 72 65 5f /raw/50f_before_
00000190: 63 68 61 6e 67 65 2e 63 73 76 3a 20 4e 6f 20 73 change.csv: No s
000001a0: 75 63 68 20 66 69 6c 65 20 6f 72 20 64 69 72 65 uch file or dire
000001b0: 63 74 6f 72 79 0a 20 20 e5 8f 98 e6 9b b4 e5 89 ctory. ........
000001c0: 8d e4 ba a7 e7 89 a9 e8 a1 8c e6 95 b0 3a 20 30 .............: 0
000001d0: 0a 20 20 e5 8f 98 e6 9b b4 e5 90 8e ef bc 9a e4 . .............
000001e0: bb bb e5 8a a1 e4 b8 ba e7 bb 88 e6 80 81 ef bc ................
000001f0: 8c e9 87 8d e6 96 b0 e6 8a 95 e9 80 92 20 64 69 ............. di
00000200: 73 70 61 74 63 68 20 e4 bc 9a e5 9b a0 e4 bb bb spatch .........
00000210: e5 8a a1 e9 9d 9e 20 70 72 6f 63 65 73 73 69 6e ...... processin
00000220: 67 20 e8 80 8c e7 9b b4 e6 8e a5 e8 bf 94 e5 9b g ..............
00000230: 9e ef bc 9b e5 a6 82 e9 9c 80 e5 86 8d e6 ac a1 ................
00000240: e6 89 a7 e8 a1 8c e9 a1 bb e6 96 b0 e5 bb ba e4 ................
00000250: bb bb e5 8a a1 20 e2 86 92 20 e6 96 b0 e5 bb ba ..... ... ......
00000260: e4 bb bb e5 8a a1 e6 97 b6 e5 86 bb e7 bb 93 e7 ................
00000270: b1 bb e5 9e 8b e5 b7 b2 e4 b8 ba e4 bb a3 e7 90 ................
00000280: 86 ef bc 8c e5 b0 86 e5 9c a8 e6 89 a7 e8 a1 8c ................
00000290: e6 9c 9f e8 a2 ab e9 97 a8 e7 a6 81 e6 8b 92 e7 ................
000002a0: bb 9d ef bc 88 e8 a7 81 20 33 33 20 e6 ae b5 ef ........ 33 ....
000002b0: bc 89 ef bc 8c e5 9b a0 e6 ad a4 e6 97 a0 e6 b3 ................
000002c0: 95 e5 be 97 e5 88 b0 e3 80 8c e5 90 8c e4 bb bb ................
000002d0: e5 8a a1 e5 8f 98 e6 9b b4 e5 89 8d e5 90 8e e4 ................
000002e0: b8 a4 e4 bb bd e4 ba a7 e7 89 a9 e3 80 8d e7 9a ................
000002f0: 84 e8 a1 8c e6 95 b0 e5 af b9 e7 85 a7 0a 23 20 ..............#
00000300: e9 80 80 e5 87 ba e7 a0 81 0a 30 0a ..........0.
```
### 产物行级结论(原始输出见上)
- **A 分组一致性:已验证**。产物全文A/B/C-3为 5 行:表头 + 4 个分组行(`三贴MiFi``三贴转双贴MiFi``带线充电宝``未设置`+ `合计`同筛选的页面汇总A-2`items` 4 行 + `totals`,分组值与各列数值逐列一致(例:`三贴MiFi,3,1,0.33,-,1,1,1.05,1.05,1.97,1.97` 与页面该分组同值;`合计,6,4,0.67,4,3,1,1.05,0.35,0.66,1.97` 与页面 `totals` 同值),行数 = 分组行数 + 1 个合计行。
- **B 列等于页面字段:已验证**。产物表头行原文 = `设备名称,采购数量,累计激活数,激活率,新增激活数,累计在网数,活跃用户数,累计用量(GB),单用户卡均(GB),含零预测卡均(GB),不含零预测卡均(GB)`,与页面字段(分组列名 `设备名称` + 同名指标列)逐字一致;任务行冻结的 `resolved_headers` 同值。
- **C 无文字总结:已验证**。产物全文只有表头行、数据行与合计行,没有任何总结/说明文字行。
- **D 分母为零写「-」:已验证**。产物中分母为零的比率/卡均写作 `-`(如 `带线充电宝``单用户卡均(GB)、含零预测卡均(GB)、不含零预测卡均(GB)` 三列为 `-``三贴转双贴MiFi``不含零预测卡均``-`);采购为零的快照日另有单独的接口 `null` 与产物 `-` 对照(见 D 段)。
- **E 冻结范围不扩大:已验证(变更前后行数对照不可得,构造尝试与原因见 E-2**。两个不同冻结区间的任务各自按其冻结筛选产出A-1 与 E 段),冻结 `filters`/`resolved_headers`/`scope_shop_ids` 原文与执行期读取范围一致;「同一任务改冻结类型后再执行」无法产出可比行数——任务为终态、重新投递 dispatch 会因状态非 processing 直接返回,新建任务时冻结类型已为代理又会被执行期门禁拒绝(见 33 段),故该子项如实保留为「不可得」。
## 限制与未验证项(如实标注)
1. **导出产物文件内容**:取证时把存储端点指向本地假 S3流水线写出真实文件若该段原始输出显示任务失败或文件为空即为该次执行的真实结果不另行修饰。
2. **运行真实 Worker 的副作用**:测试 Redis 的 `data:cleanup` / `default` 队列中存在本次变更之外的历史待处理任务consumer 角色的 Worker 会一并消费它们(日志中可见退款/订单相关任务),这是「用真实 Worker 取证」的固有副作用,与本次实现无关;本次未向生产环境做任何连接或写入。
3. **零采购日的导出产物不可得**2026-09-15采购=0的导出任务实际失败status=4、file_key 空、无产物对象),「分母为零写「-」」由 09-16 产物内零分母分组 + 该日接口 null 共同支撑;不存在零采购日的产物对照。
4. **导出四段的达成度(第二轮已补齐产物行级内容)**执行期账号类型复核33、通用入口+代理32、导出与列表同筛选同口径31、列等于页面字段、无文字总结、分母为零写「-」、冻结范围不扩大34均已由真实运行验证并附原始输出唯一仍不可得的子项是「同一任务变更冻结权限类型前后的产物行数对照」原因与构造尝试见 E-2 段,未做任何修饰。
5. **2026-09-17D2快照在场景采集时点尚未生成**:入队受 asynq 唯一锁与队列排队影响D2 在场景采集之后才由真实 Worker 生成(见「快照生成」段与 B1 段的行数)。因此文件中 `20_reversal_new_negative``21_trend_day``24_renewal_range_two_expiries` 三项的原始响应可能反映「D2 缺失」的当时状态D2 生成后的行数证据见「快照生成」段末尾的 SQL 输出与「B1/m2/m1」段。
6. **生产规模性能未验证**:测试库是小规模数据(未删除设备 6 台 + fixture 8 台),设备粒度约 1.9 万行/日的生成耗时未在生产规模下实测,仍为设计推演。
7. **定时调度的真实触发03:30 cron未等待实跑**:只验证了处理器注册、队列映射、手工入队到执行的完整路径与调度注册代码。
## 启动就绪:真实 API /health含 Worker 注册日志行数)
原始文件:`/tmp/au26015/raw/00_readiness.txt`
```
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:03:38 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 124
X-Request-Id: 740359ac-6eb9-4010-b1f2-6b04a4a1d711
{"code":0,"data":{"status":"healthy","service":"junhong_cmp_fiber"},"msg":"success","timestamp":"2026-09-17T20:03:38+08:00"}
```
## 登录fixture 账号经 POST /api/auth/login 取 token错误密码不在此列
原始文件:`/tmp/au26015/raw/01_login.txt`
```
# 命令
POST http://127.0.0.1:3000/api/auth/login {'username':'AUG26015-超管'|'AUG26015-平台'|'AUG26015-代理'|'AUG26015-企业','password':'AUG26015-Pass1','device':'web'}
# 原始输出(超管)
{"code":0,"data":{"access_token":"61afa868-2032-4aa0-a9f0-d3afc93fcaee","refresh_token":"2f4a4833-a00d-4379-8097-d5050b2816f5","expires_in":86400,"user":{"id":782,"username":"AUG26015-超管","phone":"19900001001","user_type":1,"user_type_name":"超级管理员"},"permissions":["menu:lot_task","menu:device_task","menu:mycommission","menu:asset_assign","menu:authorization_records","permission:add","permission:edit","permission:delete","package_series:add","package_series:edit","package_series:update_status","package:add","package:update_away","package:update_status","package:edit","package:delete","series_grants:add","series_grants:update_status","series_grants:packages_list","series_grants:edit","series_grants:delete","shop:add","shop:look_customer","shop:edit","shop:delete","account:add","account:patch_role","account:edit","account:delete","iot_card:batch_allocation","iot_card:batch_recycle","iot_card:batch_setting","lot_task:bulk_import","device_task:bulk_import","device:batch_allocate","device:batch_recall","device:batch_set_series","device:view_cards","device:delete","enterprise_customer:add","enterprise_customer:edit","enterprise_customer:look_customer","enterprise_customer:card_authorization","enterprise_customer:update_pwd","orders:add","role:update_status","carrier:add","carrier:update_status","carrier:delete","withdrawal_settings:add","my_commission:add","agent_commission:detail","package_series:delete","shop_account:add","enterprise_account:add","shop:modify_status","shop:default_role","account:modify_status","enterprise_customer:status","customer_accounts:patch_role","shop_account:patch_role","iot_card:start_card","iot_card:stop_card","iot_card_task:view_detail","iot_card_task:download_fail_data","device_task:view_detail","device_task:download_fail_data","device:reboot","device:factory_reset","device:switch_sim","asset_assign:view_detail","authorization_records:view_detail","authorization_records:update_remark","orders:view_detail","orders:delete","series_grants:manage_packages","series_grants:edit_packages","series_grants:delete_packages","iot_card:view_detail","device:view_detail","package:update_retail_price","enterprise_customer:device_authorization","carrier:edit","package_series:detail","package:detail","series_grants:detail","device:manual_deactivate","exchange:create","exchange:cancel","agent_recharge:confirm_payment","agent_recharge:create","refund:return","refund:approve","refund:reject","payment_settings:create","payment_settings:detail","payment_settings:status","payment_settings:edit","payment_settings:delete","data_cleanup:create","data_cleanup:preview","data_cleanup:trigger","data_cleanup:logs","data_cleanup:delete","alert_rules:create","alert_rules:toggle","alert_rules:edit","alert_rules:delete","menu:exchange_detail","menu:analysis","dashboard_analysis:polling_stats","dashboard_analysis:commission_summary","dashboard_analysis:commission_stats","dashboard_analysis:withdrawal_settings","dashboard_analysis:payment_settings","device:clear_series","iot_card:clear_series","iot_card:realname_policy","device:realname_policy","asset:card_realname_policy","asset:device_realname_policy","iot_info:auto_polling","device_info:auto_polling","iot_info:start","iot_info:stop","device_info:switch_mode","device_info:reboot","device_info:reset","device_info:switch_card","device_info:set_wifi","menu:dashboard","menu:ecommerce","menu:console","package_usage:daily_records","refund:create","refund:detail","agent_recharge:detail_page","iot_card:update_realname_status","iot_info:update_realname_status","bound_card:update_realname_status","package:create_refund","orders:view_payment_voucher","agent_recharge:view_payment_voucher","series_grants:manage_packages_list","series_grants:edit_packages_list","series_grants:delete_packages_list","device:bind_card","device:unbind_card","order:package_list_detail","refund:package_list_detail","polling_manual:trigger_cancel","polling_manual:refresh","asset_info:download_log_file","iot_card:download_log_file","device:download_log_file","asset_info:view_current_package_real_usage","asset_info:view_current_package_virtual_usage","exchange:ship","exchange:complete","exchange:renew","refund:view_voucher","asset_info:view_card_month_usage","menu:task_device","menu:export_detail","orders:export","asset_info:sync","devices:export","iot_card:export","menu:order_package_invalidate_task","order_package_invalidate_task:create","order_package_invalidate_task:detail","menu:order_package_invalidate_task_detail","agent_recharge:reject","devices:authorize_enterprise","devices:recall_enterprise_authorization","iot_card:recall_enterprise_authorization","iot_card:authorize_enterprise","menu:export_iot_card","menu:export_order","export_task:device_detail","export_task:device_download","export_task:device_cancel","export_task:iot_card_detail","export_task:iot_card_download","export_task:iot_card_cancel","export_task:order_detail","export_task:order_download","export_task:order_cancel","menu:payment_settings","asset_info:view_sync_trail","bulk_purchase:view","bulk_purchase:create","bulk_purchase:detail","bulk_purchase:items","bulk_purchase:template","series_grants:update_expiry_base","wecom:account_binding","menu:expiring_assets","exchange:detail","device_task:allocation_create","device_task:allocation_detail","iot_card:speed_tier_update","shop:credit_limit_manage","menu:bulk_purchase_detail","menu:export_agent_wallet","menu:export_refund","menu:export_agent_recharg","menu:export_exchange","wecom:applications","wecom:members","wecom:scenes","wecom:application_create","wecom:application_test","wecom:application_edit","wecom:member_manage","wecom:member_sync","wecom:member_default_creator","wecom:scene_create","wecom:scene_edit","agent_wallet_transaction:export","refund:export","agent_recharge:export","package:export","exchange:export","system_config:payment_methods","export_task:agent_wallet_transaction_detail","export_task:agent_wallet_transaction_download","export_task:refund_detail","export_task:refund_download","export_task:agent_recharge_detail","export_task:agent_recharge_download","export_task:exchange_detail","export_task:exchange_download","export_task:package_detail","export_task:package_download","package:update_expires_at","package:update_used_data","audit:shop_entry","audit:finance_timeline","audit:resource_timeline","audit:enterprise_entry","audit:card_entry","audit:agent_card_activity","audit:enterprise_card_activity","audit:device_entry","audit:agent_device_activity","audit:enterprise_device_activity","audit:exchange_entry","audit:agent_exchange_activity","audit:exchange_old_asset_entry","audit:exchange_new_asset_entry","audit:asset_allocation_entry","audit:agent_asset_allocation_activity","audit:asset_allocation_asset_entry","audit:asset_info_entry","audit:agent_asset_info_activity","audit:enterprise_asset_info_activity","audit:asset_info_binding_card_entry","audit:asset_info_binding_entry","audit:asset_info_wallet_finance","audit:asset_info_wallet_asset","audit:order_entry","audit:order_finance_entry","audit:agent_recharge_entry","audit:agent_recharge_finance_entry","audit:agent_recharge_approval_entry","audit:refund_entry","audit:refund_finance_entry","audit:refund_approval_entry","audit:event_detail","audit:risk_view","audit:risk_event_detail","audit:integration_detail","menu:events_details","menu:integrations","audit:audit_event_resource_timeline","audit:actor_timeline","audit:request_timeline","audit:correlation_timeline","audit:audit_event_integration_detail","audit:integration_detail_request_timeline","audit:integration_detail_correlation_timeline","audit:integration_detail_resource_timeline","agent_recharge:trigger_approval","refund:trigger_approval","payment_merchant_pool:merchant_create","payment_merchant_pool:merchant_edit","payment_merchant_pool:merchant_toggle","payment_merchant_pool:merchant_delete","payment_merchant_pool:pool_create","payment_merchant_pool:pool_edit","payment_merchant_pool:pool_toggle","payment_merchant_pool:wechat_auth_edit","employee_collection:bill_detailbtn","employee_collection:bill_close","employee_collection:application_create","employee_collection:application_update","employee_collection:payment_method_create","employee_collection:payment_method_edit","employee_collection:payment_method_delete","payment_merchant_pool:merchant_detail","payment_merchant_pool:pool_detail","payment_merchant_pools:detail_views","payment_merchant_pools:pool_detail_views","menu:system","menu:package","menu:shop","role:add","menu:account_management","role:edit","menu:asset","role:delete","menu:order_management","role:permission","menu:finance","menu:commission","menu:setting","menu:polling_management","employee_collection:bill_detail","employee_collection:application_view","employee_collection:application_detail","menu:role","menu:audit","menu:merchant_pools","menu:permission","menu:carrier","menu:series","menu:package_list","menu:package_grants","menu:series_grants_detail","series_grants:packages","menu:package_series_detail","menu:package_list_detail","menu:device_batch_allocation","employee_collection:payment_method_view","menu:shop_list","menu:account_list","menu:enterprise_customer","menu:shop_enterprise","menu:asset_information","menu:iot_card","menu:devices","menu:exchange","menu:task_management","menu:record_management","menu:task_detail","menu:asset_assign_detail","menu:authorization_records_detail","menu:order_list","menu:export_task","menu:orders_detail","menu:agent_recharge","menu:finance_refund","agent_recharge:detail","audit:event_list","menu:refund_detail","audit:integration_view","menu:my_commision","menu:agent_commission","menu:approval","menu:withdrawal_settings","settings:payment_settings","menu:operation_password","polling_management:concurrency","polling_management:config","polling_management:monitor","menu:export_package","employee_collection:bill_view","menu:system_configs"],"menus":[{"id":2727,"perm_code":"menu:dashboard","name":"仪表盘","url":"/dashboard","sort":0,"children":[{"id":2706,"perm_code":"menu:analysis","name":"分析页","url":"/dashboard/analysis","sort":0,"children":[]},{"id":2728,"perm_code":"menu:ecommerce","name":"电子商务","url":"/dashboard/ecommerce","sort":0,"children":[]},{"id":2729,"perm_code":"menu:console","name":"控制台","url":"/dashboard/console","sort":0,"children":[]}]},{"id":2376,"perm_code":"menu:system","name":"系统管理","url":"/system","sort":1,"children":[{"id":2377,"perm_code":"menu:role","name":"角色管理","url":"/system/role","sort":11,"children":[]},{"id":2378,"perm_code":"menu:permission","name":"权限管理","url":"/system/permission","sort":12,"children":[]},{"id":2584,"perm_code":"menu:carrier","name":"运营商管理","url":"/system/carrier-management","sort":13,"children":[]}]},{"id":2395,"perm_code":"menu:package","name":"套餐管理","url":"/package-management","sort":2,"children":[{"id":2396,"perm_code":"menu:series","name":"套餐系列","url":"/package-management/package-series","sort":14,"children":[]},{"id":2397,"perm_code":"menu:package_list","name":"套餐管理","url":"/package-management/package-list","sort":15,"children":[]},{"id":2398,"perm_code":"menu:package_grants","name":"代理系列授权","url":"/package-management/series-grants","sort":16,"children":[]},{"id":2608,"perm_code":"menu:series_grants_detail","name":"代理系列授权详情","url":"/package-management/series-grants/detail/:id","sort":17,"children":[]},{"id":2742,"perm_code":"series_grants:packages","name":"代理系列授权套餐列表","url":"/package-management/series-grants/packages/:id","sort":18,"children":[]},{"id":2606,"perm_code":"menu:package_series_detail","name":"套餐系列详情","url":"/package-management/package-series/detail/:id","sort":19,"children":[]},{"id":2605,"perm_code":"menu:package_list_detail","name":"套餐管理详情","url":"/package-management/package-list/detail/:id","sort":20,"children":[]}]},{"id":2389,"perm_code":"menu:shop","name":"店铺管理","url":"/shop-management","sort":3,"children":[{"id":2390,"perm_code":"menu:shop_list","name":"店铺列表","url":"/shop-management/list","sort":21,"children":[]}]},{"id":2405,"perm_code":"menu:account_management","name":"账号管理","url":"/account-management","sort":4,"children":[{"id":2498,"perm_code":"menu:account_list","name":"账号列表","url":"/account-management/account","sort":22,"children":[]},{"id":2392,"perm_code":"menu:enterprise_customer","name":"企业客户","url":"/account-management/enterprise-customer","sort":23,"children":[]},{"id":2602,"perm_code":"menu:shop_enterprise","name":"关联账号列表","url":"/account-management/enterprise-customer/customer-accounts/:id","sort":24,"children":[]}]},{"id":2384,"perm_code":"menu:asset","name":"资产管理","url":"/asset-management","sort":5,"children":[{"id":2813,"perm_code":"menu:expiring_assets","name":"临期资产","url":"/asset-management/expiring-assets","sort":0,"children":[]},{"id":2705,"perm_code":"menu:exchange_detail","name":"换货详情","url":"/asset-management/exchange-management/detail/:id","sort":0,"children":[]},{"id":2821,"perm_code":"menu:bulk_purchase_detail","name":"批量订购套餐详情","url":"/asset-management/task-management/bulk-purchase/detail/:id","sort":0,"children":[]},{"id":2664,"perm_code":"menu:asset_information","name":"资产信息","url":"/asset-management/asset-information","sort":25,"children":[]},{"id":2385,"perm_code":"menu:iot_card","name":"loT卡管理","url":"/asset-management/iot-card-management","sort":26,"children":[]},{"id":2388,"perm_code":"menu:devices","name":"设备管理","url":"/asset-management/devices","sort":27,"children":[]},{"id":2669,"perm_code":"menu:exchange","name":"换货管理","url":"/asset-management/exchange-management","sort":28,"children":[]},{"id":2655,"perm_code":"menu:task_management","name":"任务管理","url":"/asset-management/task-management","sort":29,"children":[{"id":2387,"perm_code":"menu:device_task","name":"设备任务","url":"/asset-management/task-management/device-task","sort":0,"children":[]},{"id":2386,"perm_code":"menu:lot_task","name":"loT卡任务","url":"/asset-management/task-management/iot-card-task","sort":0,"children":[]},{"id":2780,"perm_code":"menu:order_package_invalidate_task","name":"订单套餐批量作废","url":"/asset-management/task-management/order-package-invalidate-task","sort":0,"children":[]},{"id":2784,"perm_code":"menu:order_package_invalidate_task_detail","name":"订单套餐作废任务详情","url":"/asset-management/task-management/order-package-invalidate-task/detail","sort":0,"children":[]},{"id":2805,"perm_code":"bulk_purchase:view","name":"批量订购套餐","url":"/asset-management/task-management/bulk-purchase","sort":0,"children":[]},{"id":2815,"perm_code":"menu:device_batch_allocation","name":"设备批量任务","url":"/asset-management/task-management/device-batch-allocation","sort":20,"children":[]}]},{"id":2656,"perm_code":"menu:record_management","name":"记录管理","url":"/asset-management/record-management","sort":30,"children":[{"id":2501,"perm_code":"menu:asset_assign","name":"分配记录","url":"/asset-management/record-management/asset-assign","sort":0,"children":[]},{"id":2502,"perm_code":"menu:authorization_records","name":"授权记录","url":"/asset-management/record-management/authorization-records","sort":0,"children":[]}]},{"id":2625,"perm_code":"menu:task_detail","name":"卡、设备、设备批量详情","url":"/asset-management/task-management/task-detail","sort":33,"children":[]},{"id":2626,"perm_code":"menu:asset_assign_detail","name":"资产分配详情","url":"/asset-management/record-management/asset-assign/detail/:id","sort":34,"children":[]},{"id":2627,"perm_code":"menu:authorization_records_detail","name":"授权记录详情","url":"/asset-management/record-management/authorization-records/detail/:id","sort":35,"children":[]},{"id":2771,"perm_code":"menu:export_task","name":"导出管理","url":"/asset-management/export-task-management","sort":36,"children":[{"id":2824,"perm_code":"menu:export_refund","name":"导出退款","url":"/asset-management/export-task-management/export-refund","sort":0,"children":[]},{"id":2790,"perm_code":"menu:export_iot_card","name":"导出IOT卡","url":"/asset-management/export-task-management/export-iot-card","sort":0,"children":[]},{"id":2773,"perm_code":"menu:export_detail","name":"导出详情","url":"/asset-management/export-task-management/export-task-detail","sort":0,"children":[]},{"id":2791,"perm_code":"menu:export_order","name":"导出订单","url":"/asset-management/export-task-management/export-order","sort":0,"children":[]},{"id":2823,"perm_code":"menu:export_agent_wallet","name":"导出代理主钱包流水","url":"/asset-management/export-task-management/export-agent-wallet-transaction","sort":0,"children":[]},{"id":2772,"perm_code":"menu:task_device","name":"导出设备","url":"/asset-management/export-task-management/export-device","sort":0,"children":[]},{"id":2826,"perm_code":"menu:export_exchange","name":"导出换货","url":"/asset-management/export-task-management/export-exchange","sort":0,"children":[]},{"id":2825,"perm_code":"menu:export_agent_recharg","name":"导出代理充值","url":"/asset-management/export-task-management/export-agent-recharge","sort":0,"children":[]},{"id":2822,"perm_code":"menu:export_package","name":"导出套餐","url":"/asset-management/export-task-management/export-package","sort":110,"children":[]}]}]},{"id":2391,"perm_code":"menu:order_management","name":"订单管理","url":"/order-management","sort":6,"children":[{"id":2394,"perm_code":"menu:order_list","name":"订单列表","url":"/order-management/order-list","sort":36,"children":[]},{"id":2640,"perm_code":"menu:orders_detail","name":"订单详情","url":"/order-management/order-list/detail/:id","sort":37,"children":[]}]},{"id":2673,"perm_code":"menu:finance","name":"财务管理","url":"/finance","sort":7,"children":[{"id":2924,"perm_code":"employee_collection:application_detail","name":"核销申请详情","url":"/finance/employee-collection/applications/detail/:id","sort":10,"children":[]},{"id":2920,"perm_code":"employee_collection:bill_detail","name":"账单详情页","url":"/finance/employee-collection/bills/detail/:id","sort":10,"children":[]},{"id":2923,"perm_code":"employee_collection:application_view","name":"核销申请","url":"/finance/employee-collection/applications","sort":10,"children":[]},{"id":2925,"perm_code":"employee_collection:payment_method_view","name":"收款方式管理","url":"/finance/employee-collection/payment-methods","sort":20,"children":[]},{"id":2674,"perm_code":"menu:agent_recharge","name":"代理充值","url":"/finance/agent-recharge","sort":38,"children":[]},{"id":2675,"perm_code":"menu:finance_refund","name":"退款管理","url":"/finance/refund","sort":39,"children":[]},{"id":2731,"perm_code":"agent_recharge:detail","name":"代理充值详情","url":"/finance/agent-recharge/detail/:id","sort":40,"children":[]},{"id":2732,"perm_code":"menu:refund_detail","name":"退款管理详情","url":"/finance/refund/detail/:id","sort":41,"children":[]},{"id":2592,"perm_code":"menu:agent_commission","name":"代理商资金概况","url":"/finance/agent-fund-overview","sort":43,"children":[]},{"id":2917,"perm_code":"employee_collection:bill_view","name":"员工代收款账单","url":"/finance/employee-collection/bills","sort":110,"children":[]}]},{"id":2672,"perm_code":"menu:commission","name":"佣金管理","url":"/commission","sort":8,"children":[{"id":2591,"perm_code":"menu:my_commision","name":"我的佣金","url":"/commission/my-commission","sort":42,"children":[]},{"id":2589,"perm_code":"menu:approval","name":"提现审批","url":"/commission/withdrawal-approval","sort":44,"children":[]}]},{"id":2681,"perm_code":"menu:setting","name":"设置管理","url":"/settings","sort":9,"children":[{"id":2932,"perm_code":"payment_merchant_pools:pool_detail_views","name":"商户池详情","url":"/settings/payment-merchant-pools/pool-detail/2","sort":0,"children":[]},{"id":2801,"perm_code":"menu:payment_settings","name":"支付详情","url":"/settings/payment-settings/detail/:id","sort":0,"children":[]},{"id":2829,"perm_code":"wecom:scenes","name":"企微审批场景","url":"/settings/wecom/scenes","sort":0,"children":[]},{"id":2828,"perm_code":"wecom:members","name":"企微成员管理","url":"/settings/wecom/members","sort":0,"children":[]},{"id":2931,"perm_code":"payment_merchant_pools:detail_views","name":"支付商户详情页","url":"/settings/payment-merchant-pools/detail/:id","sort":0,"children":[]},{"id":2827,"perm_code":"wecom:applications","name":"企微应用管理","url":"/settings/wecom/applications","sort":0,"children":[]},{"id":2908,"perm_code":"menu:merchant_pools","name":"商户池管理","url":"/settings/payment-merchant-pools","sort":11,"children":[]},{"id":2590,"perm_code":"menu:withdrawal_settings","name":"提现配置","url":"/settings/withdrawal-settings","sort":45,"children":[]},{"id":2682,"perm_code":"settings:payment_settings","name":"支付配置","url":"/settings/payment-settings","sort":46,"children":[]},{"id":2755,"perm_code":"menu:operation_password","name":"密码设置","url":"/settings/operation-password","sort":47,"children":[]},{"id":2843,"perm_code":"menu:system_configs","name":"系统配置","url":"/settings/system-configs","sort":1110,"children":[]}]},{"id":2688,"perm_code":"menu:polling_management","name":"轮询管理","url":"/polling-management","sort":10,"children":[{"id":2697,"perm_code":"polling_management:concurrency","name":"并发配置","url":"/polling-management/concurrency","sort":51,"children":[]},{"id":2698,"perm_code":"polling_management:config","name":"轮询配置","url":"/polling-management/config","sort":52,"children":[]},{"id":2700,"perm_code":"polling_management:monitor","name":"轮询监控","url":"/polling-management/monitor","sort":54,"children":[]}]},{"id":2889,"perm_code":"menu:audit","name":"审计中心","url":"/audit","sort":11,"children":[{"id":2896,"perm_code":"menu:events_details","name":"审计事件详情","url":"/audit/events/:id","sort":0,"children":[]},{"id":2897,"perm_code":"menu:integrations","name":"外部集成交互详情","url":"/audit/integrations/:id","sort":0,"children":[]},{"id":2892,"perm_code":"audit:risk_view","name":"风险中心","url":"/audit/risks","sort":0,"children":[]},{"id":2890,"perm_code":"audit:event_list","name":"审计事件","url":"/audit/events","sort":40,"children":[]},{"id":2893,"perm_code":"audit:integration_view","name":"外部交互","url":"/audit/integrations","sort":41,"children":[]}]}],"buttons":["permission:add","permission:edit","permission:delete","package_series:add","package_series:edit","package_series:update_status","package:add","package:update_away","package:update_status","package:edit","package:delete","series_grants:add","series_grants:update_status","series_grants:packages_list","series_grants:edit","series_grants:delete","shop:add","shop:look_customer","shop:edit","shop:delete","account:add","account:patch_role","account:edit","account:delete","iot_card:batch_allocation","iot_card:batch_recycle","iot_card:batch_setting","lot_task:bulk_import","device_task:bulk_import","device:batch_allocate","device:batch_recall","device:batch_set_series","device:view_cards","device:delete","enterprise_customer:add","enterprise_customer:edit","enterprise_customer:look_customer","enterprise_customer:card_authorization","enterprise_customer:update_pwd","orders:add","role:update_status","carrier:add","carrier:update_status","carrier:delete","withdrawal_settings:add","my_commission:add","agent_commission:detail","package_series:delete","shop_account:add","enterprise_account:add","shop:modify_status","shop:default_role","account:modify_status","enterprise_customer:status","customer_accounts:patch_role","shop_account:patch_role","iot_card:start_card","iot_card:stop_card","iot_card_task:view_detail","iot_card_task:download_fail_data","device_task:view_detail","device_task:download_fail_data","device:reboot","device:factory_reset","device:switch_sim","asset_assign:view_detail","authorization_records:view_detail","authorization_records:update_remark","orders:view_detail","orders:delete","series_grants:manage_packages","series_grants:edit_packages","series_grants:delete_packages","iot_card:view_detail","device:view_detail","package:update_retail_price","enterprise_customer:device_authorization","carrier:edit","package_series:detail","package:detail","series_grants:detail","device:manual_deactivate","exchange:create","exchange:cancel","agent_recharge:confirm_payment","agent_recharge:create","refund:return","refund:approve","refund:reject","payment_settings:create","payment_settings:detail","payment_settings:status","payment_settings:edit","payment_settings:delete","data_cleanup:create","data_cleanup:preview","data_cleanup:trigger","data_cleanup:logs","data_cleanup:delete","alert_rules:create","alert_rules:toggle","alert_rules:edit","alert_rules:delete","dashboard_analysis:polling_stats","dashboard_analysis:commission_summary","dashboard_analysis:commission_stats","dashboard_analysis:withdrawal_settings","dashboard_analysis:payment_settings","device:clear_series","iot_card:clear_series","iot_card:realname_policy","device:realname_policy","asset:card_realname_policy","asset:device_realname_policy","iot_info:auto_polling","device_info:auto_polling","iot_info:start","iot_info:stop","device_info:switch_mode","device_info:reboot","device_info:reset","device_info:switch_card","device_info:set_wifi","package_usage:daily_records","refund:create","refund:detail","agent_recharge:detail_page","iot_card:update_realname_status","iot_info:update_realname_status","bound_card:update_realname_status","package:create_refund","orders:view_payment_voucher","agent_recharge:view_payment_voucher","series_grants:manage_packages_list","series_grants:edit_packages_list","series_grants:delete_packages_list","device:bind_card","device:unbind_card","order:package_list_detail","refund:package_list_detail","polling_manual:trigger_cancel","polling_manual:refresh","asset_info:download_log_file","iot_card:download_log_file","device:download_log_file","asset_info:view_current_package_real_usage","asset_info:view_current_package_virtual_usage","exchange:ship","exchange:complete","exchange:renew","refund:view_voucher","asset_info:view_card_month_usage","orders:export","asset_info:sync","devices:export","iot_card:export","order_package_invalidate_task:create","order_package_invalidate_task:detail","agent_recharge:reject","devices:authorize_enterprise","devices:recall_enterprise_authorization","iot_card:recall_enterprise_authorization","iot_card:authorize_enterprise","export_task:device_detail","export_task:device_download","export_task:device_cancel","export_task:iot_card_detail","export_task:iot_card_download","export_task:iot_card_cancel","export_task:order_detail","export_task:order_download","export_task:order_cancel","asset_info:view_sync_trail","bulk_purchase:create","bulk_purchase:detail","bulk_purchase:items","bulk_purchase:template","series_grants:update_expiry_base","wecom:account_binding","exchange:detail","device_task:allocation_create","device_task:allocation_detail","iot_card:speed_tier_update","shop:credit_limit_manage","wecom:application_create","wecom:application_test","wecom:application_edit","wecom:member_manage","wecom:member_sync","wecom:member_default_creator","wecom:scene_create","wecom:scene_edit","agent_wallet_transaction:export","refund:export","agent_recharge:export","package:export","exchange:export","system_config:payment_methods","export_task:agent_wallet_transaction_detail","export_task:agent_wallet_transaction_download","export_task:refund_detail","export_task:refund_download","export_task:agent_recharge_detail","export_task:agent_recharge_download","export_task:exchange_detail","export_task:exchange_download","export_task:package_detail","export_task:package_download","package:update_expires_at","package:update_used_data","audit:shop_entry","audit:finance_timeline","audit:resource_timeline","audit:enterprise_entry","audit:card_entry","audit:agent_card_activity","audit:enterprise_card_activity","audit:device_entry","audit:agent_device_activity","audit:enterprise_device_activity","audit:exchange_entry","audit:agent_exchange_activity","audit:exchange_old_asset_entry","audit:exchange_new_asset_entry","audit:asset_allocation_entry","audit:agent_asset_allocation_activity","audit:asset_allocation_asset_entry","audit:asset_info_entry","audit:agent_asset_info_activity","audit:enterprise_asset_info_activity","audit:asset_info_binding_card_entry","audit:asset_info_binding_entry","audit:asset_info_wallet_finance","audit:asset_info_wallet_asset","audit:order_entry","audit:order_finance_entry","audit:agent_recharge_entry","audit:agent_recharge_finance_entry","audit:agent_recharge_approval_entry","audit:refund_entry","audit:refund_finance_entry","audit:refund_approval_entry","audit:event_detail","audit:risk_event_detail","audit:integration_detail","audit:audit_event_resource_timeline","audit:actor_timeline","audit:request_timeline","audit:correlation_timeline","audit:audit_event_integration_detail","audit:integration_detail_request_timeline","audit:integration_detail_correlation_timeline","audit:integration_detail_resource_timeline","agent_recharge:trigger_approval","refund:trigger_approval","payment_merchant_pool:merchant_create","payment_merchant_pool:merchant_edit","payment_merchant_pool:merchant_toggle","payment_merchant_pool:merchant_delete","payment_merchant_pool:pool_create","payment_merchant_pool:pool_edit","payment_merchant_pool:pool_toggle","payment_merchant_pool:wechat_auth_edit","employee_collection:bill_detailbtn","employee_collection:bill_close","employee_collection:application_create","employee_collection:application_update","employee_collection:payment_method_create","employee_collection:payment_method_edit","employee_collection:payment_method_delete","payment_merchant_pool:merchant_detail","payment_merchant_pool:pool_detail","role:add","role:edit","role:delete","role:permission"]},"msg":"success","timestamp":"2026-09-17T20:21:00+08:00"}# 原始输出(平台)
{"code":0,"data":{"access_token":"fd902a4b-9ad5-46f7-963f-f20269974497","refresh_token":"e8b2ae16-01c0-4f76-b255-ed0eba60d810","expires_in":86400,"user":{"id":783,"username":"AUG26015-平台","phone":"19900001002","user_type":2,"user_type_name":"平台用户"},"permissions":[],"menus":[],"buttons":[]},"msg":"success","timestamp":"2026-09-17T20:21:01+08:00"}# 原始输出(代理)
{"code":0,"data":{"access_token":"bfaaf91e-4a3b-4467-b2d3-30fdcabe79bf","refresh_token":"6ea9f792-a091-490e-8940-7dcd1aac987a","expires_in":86400,"user":{"id":784,"username":"AUG26015-代理","phone":"19900001003","user_type":3,"user_type_name":"代理账号","shop_id":1585},"permissions":[],"menus":[],"buttons":[]},"msg":"success","timestamp":"2026-09-17T20:21:01+08:00"}# 原始输出(企业)
{"code":0,"data":{"access_token":"19569045-e33c-44ef-b0cc-30a65e9ee804","refresh_token":"614a6cb9-c802-4f0b-a9b1-dfdc4e9440a6","expires_in":86400,"user":{"id":785,"username":"AUG26015-企业","phone":"19900001004","user_type":4,"user_type_name":"企业账号"},"permissions":[],"menus":[],"buttons":[]},"msg":"success","timestamp":"2026-09-17T20:21:01+08:00"}# 退出码
0
# token 前缀
super=57b98840-57ed-49fb-a platform=3a4260f7-6c91-4fd5-9 agent=b3948e4b-61e6-4220-9 enterprise=ea44052c-68aa-472a-9
```
## 快照生成:手工入队 → 真实 Worker 消费D1 生成后把 AUG26015ACRD00000006 实名置 0再生成 D2/D3
原始文件:`/tmp/au26015/raw/02_snapshot_generation.txt`
```
# 命令
go run /tmp/au26015/harness/enqueue.go operations:report:snapshot 2026-09-16经 pkg/queue.Client.EnqueueTask 入队,队列 data:cleanupRedis DB 6
enqueued task_type=operations:report:snapshot payload=map[snapshot_date:2026-09-16] queue_db=6
# 退出码
0
D1 生成完成=0
# 变更AUG26015ACRD00000006 实名逆转 real_name_status=1→0
enqueued task_type=operations:report:snapshot payload=map[snapshot_date:2026-09-17] queue_db=6
D2 生成完成=0
enqueued task_type=operations:report:snapshot payload=map[snapshot_date:2026-09-18] queue_db=6
D3 生成完成=0
# 三表行数(快照日: 头行/激活行/续费行)
2026-09-16:13/1
2026-09-17:14/1
2026-09-18:14/1
# 头行
2026-09-16 采购=13 激活=8 在网=5 活跃=4 用量MB=1699.00 到期=1 续费=1
2026-09-17 采购=14 激活=7 在网=5 活跃=4 用量MB=1699.00 到期=1 续费=0
2026-09-18 采购=14 激活=7 在网=5 活跃=4 用量MB=1699.00 到期=1 续费=0
# Worker 日志(快照生成)
2026-09-17T20:03:42.068+0800 INFO queue/handler.go:405 注册每日运营报表日报快照生成任务处理器 {"task_type": "operations:report:snapshot"}
2026-09-17T20:03:49.214+0800 INFO operationsreport/generate.go:134 运营报表日报快照生成完成 {"snapshot_date": "2026-09-16", "purchased_device_count": 13, "activated_device_count": 8, "online_device_count": 5, "active_device_count": 4, "renewal_due_asset_count": 1, "renewal_renewed_asset_count": 1}
2026-09-17T20:03:49.573+0800 INFO operationsreport/generate.go:134 运营报表日报快照生成完成 {"snapshot_date": "2026-09-18", "purchased_device_count": 14, "activated_device_count": 8, "online_device_count": 5, "active_device_count": 4, "renewal_due_asset_count": 1, "renewal_renewed_asset_count": 0}
```
> 时序说明d2本节原始输出跨两次执行——第一段是 fixture 存在时生成的 D1/D2/D3头行块里 `2026-09-18 采购=14` 即该次结果,同段 Worker 日志中该日 `activated_device_count=8` 也属该次);随后 fixture 被删除B1 复核时又单独再生成过一次当日快照(那份快照的 `purchased_device_count=6`,只含库中既有设备,见 3638 段)。两次生成的差异来自 fixture 的存在与否,不是同一时点的矛盾读数;本节末尾「三表行数」标签下实际只有「快照日: 头行数」一列,原文保留未改。
## 越权:代理账号请求报表
原始文件:`/tmp/au26015/raw/03_forbidden_agent.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 403 Forbidden
Date: Thu, 17 Sep 2026 12:05:17 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 116
X-Request-Id: 59779b4d-69c8-43dd-92aa-faf3639e2ecc
{"code":1005,"data":null,"msg":"无权限操作该资源或资源不存在","timestamp":"2026-09-17T20:05:17+08:00"}
# curl 退出码
0
```
## 越权:企业账号请求报表
原始文件:`/tmp/au26015/raw/04_forbidden_enterprise.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 403 Forbidden
Date: Thu, 17 Sep 2026 12:05:17 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 116
X-Request-Id: 66da771c-041a-4034-92a7-220d3841b486
{"code":1005,"data":null,"msg":"无权限操作该资源或资源不存在","timestamp":"2026-09-17T20:05:17+08:00"}
# curl 退出码
0
```
## 越权:无令牌
原始文件:`/tmp/au26015/raw/05_no_token.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 401 Unauthorized
Date: Thu, 17 Sep 2026 12:05:17 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 95
X-Request-Id: 07397b0f-fbd2-48d8-b75f-36e8e5ead998
{"msg":"未提供认证令牌","timestamp":"2026-09-17T20:05:17+08:00","code":1002,"data":null}
# curl 退出码
0
```
## 越权:非法令牌
原始文件:`/tmp/au26015/raw/06_bad_token.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 401 Unauthorized
Date: Thu, 17 Sep 2026 12:05:17 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 104
X-Request-Id: fbed41d5-201e-47c5-b9d1-fcd6863a1147
{"code":1003,"data":null,"msg":"认证令牌无效或已过期","timestamp":"2026-09-17T20:05:17+08:00"}
# curl 退出码
0
```
## 无快照日期has_snapshot=false、分组行为空集、不回退
原始文件:`/tmp/au26015/raw/07_no_snapshot_no_fallback.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-10T00:00:00%2B08:00&end_time=2026-09-10T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:17 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 177
X-Request-Id: 9215145c-bcb5-4369-9c9b-d3abee4d1e7a
{"code":0,"data":{"has_snapshot":false,"snapshot_dates":[],"group_by":"","group_name":"全部","totals":null,"items":[]},"msg":"success","timestamp":"2026-09-17T20:05:17+08:00"}
# curl 退出码
0
```
## 闭区间:两端均等于某日零点
原始文件:`/tmp/au26015/raw/08_closed_interval_start_end_zero.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-17T00:00:00%2B08:00&end_time=2026-09-17T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 826
X-Request-Id: 20c2e15d-1e9b-4f0f-b6b2-5e17a4f4434b
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-17"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72},"items":[{"group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72}]},"msg":"success","timestamp":"2026-09-17T20:05:18+08:00"}
# curl 退出码
0
```
## 落界:起点在该日零点之后(当日不入选)
原始文件:`/tmp/au26015/raw/09_closed_interval_after_zero.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-17T00:00:01%2B08:00&end_time=2026-09-17T23:59:59%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 177
X-Request-Id: f382810d-94c8-4c92-bd19-ef01dc34b23b
{"code":0,"data":{"has_snapshot":false,"snapshot_dates":[],"group_by":"","group_name":"全部","totals":null,"items":[]},"msg":"success","timestamp":"2026-09-17T20:05:18+08:00"}
# curl 退出码
0
```
## 落界:跨零点的一天
原始文件:`/tmp/au26015/raw/10_closed_interval_cross_midnight.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T23:59:59%2B08:00&end_time=2026-09-17T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 826
X-Request-Id: db977a61-ed36-4db2-8b2c-a71bb2c89057
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-17"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72},"items":[{"group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72}]},"msg":"success","timestamp":"2026-09-17T20:05:18+08:00"}
# curl 退出码
0
```
## 非法时间date-only
原始文件:`/tmp/au26015/raw/11_invalid_time_date_only.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16&end_time=2026-09-16' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 400 Bad Request
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 186
X-Request-Id: 91373ca1-6165-4986-ae91-af610bb397b4
{"code":1001,"data":null,"msg":"start_time 时间格式不合法,必须为带时区的 RFC3339 秒级时间,例如 2026-09-01T00:00:00+08:00","timestamp":"2026-09-17T20:05:18+08:00"}
# curl 退出码
0
```
## 非法时间:无时区
原始文件:`/tmp/au26015/raw/12_invalid_time_no_zone.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T00:00:00&end_time=2026-09-16T00:00:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 400 Bad Request
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 186
X-Request-Id: 08459019-9a7b-4d1e-9ea8-9cadca3f60ba
{"data":null,"msg":"start_time 时间格式不合法,必须为带时区的 RFC3339 秒级时间,例如 2026-09-01T00:00:00+08:00","timestamp":"2026-09-17T20:05:18+08:00","code":1001}
# curl 退出码
0
```
## 非法时间:空格分隔
原始文件:`/tmp/au26015/raw/13_invalid_time_space.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16+00:00:00&end_time=2026-09-17T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 400 Bad Request
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 186
X-Request-Id: 3938f249-9e4b-4a05-b1e8-0a6390785201
{"data":null,"msg":"start_time 时间格式不合法,必须为带时区的 RFC3339 秒级时间,例如 2026-09-01T00:00:00+08:00","timestamp":"2026-09-17T20:05:18+08:00","code":1001}
# curl 退出码
0
```
## 非法时间start_time 晚于 end_time
原始文件:`/tmp/au26015/raw/14_invalid_time_order.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-17T00:00:00%2B08:00&end_time=2026-09-16T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 400 Bad Request
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 106
X-Request-Id: 172e78d9-aba2-4bf4-b18a-d579af35159d
{"code":1001,"data":null,"msg":"start_time 不能晚于 end_time","timestamp":"2026-09-17T20:05:18+08:00"}
# curl 退出码
0
```
## 非法 granularity=week
原始文件:`/tmp/au26015/raw/15_invalid_granularity.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-trend?granularity=week' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 400 Bad Request
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 160
X-Request-Id: 57516832-19b6-4928-b05d-600870756024
{"timestamp":"2026-09-17T20:05:18+08:00","code":1001,"data":null,"msg":"查询设备激活情况趋势参数不合法:趋势粒度必须为 day/month 之一"}
# curl 退出码
0
```
## 汇总:未选择分组维度 → 一行「全部」
原始文件:`/tmp/au26015/raw/16_summary_no_group.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-16T23:59:59%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 832
X-Request-Id: 492e1db8-92ff-4370-b041-d57cc461f49f
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77},"items":[{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77}]},"msg":"success","timestamp":"2026-09-17T20:05:18+08:00"}
# curl 退出码
0
```
## 汇总:单维度分组 device_name
原始文件:`/tmp/au26015/raw/17_summary_group_device_name.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-16T23:59:59%2B08:00&group_by=device_name' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:18 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 4123
X-Request-Id: 398a47cf-d661-4812-9dae-a860c06e2aeb
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"device_name","group_name":"设备名称","totals":{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77},"items":[{"group_value":"AUG26015-设备A","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":1,"total_real_traffic_gb":0.12,"per_user_average_gb":0.12,"forecast_average_including_zero_gb":0.22,"forecast_average_excluding_zero_gb":0.22},{"group_value":"AUG26015-设备B","purchased_device_count":1,"activated_device_count":0,"activation_rate":0,"new_activated_device_count":null,"online_device_count":0,"active_device_count":1,"total_real_traffic_gb":0.2,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":0.38},{"group_value":"AUG26015-设备C","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":1,"total_real_traffic_gb":0.29,"per_user_average_gb":0.29,"forecast_average_including_zero_gb":0.54,"forecast_average_excluding_zero_gb":0.54},{"group_value":"AUG26015-设备D","purchased_device_count":1,"activated_device_count":0,"activation_rate":0,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},{"group_value":"AUG26015-设备E","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},{"group_value":"AUG26015-设备F","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},{"group_value":"AUG26015-设备H","purchased_device_count":1,"activated_device_count":0,"activation_rate":0,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},{"group_value":"三贴MiFi","purchased_device_count":3,"activated_device_count":1,"activation_rate":0.33,"new_activated_device_count":null,"online_device_count":1,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":1.05,"forecast_average_including_zero_gb":1.97,"forecast_average_excluding_zero_gb":1.97},{"group_value":"三贴转双贴MiFi","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null},{"group_value":"带线充电宝","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},{"group_value":"未设置","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 汇总:单维度分组 agent
原始文件:`/tmp/au26015/raw/18_summary_group_agent.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-16T23:59:59%2B08:00&group_by=agent' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 2106
X-Request-Id: b782320c-859f-4338-a266-abca9570186f
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"agent","group_name":"代理","totals":{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77},"items":[{"group_value":"15239685654","purchased_device_count":3,"activated_device_count":2,"activation_rate":0.67,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null},{"group_value":"AUG26015-代理","purchased_device_count":7,"activated_device_count":4,"activation_rate":0.57,"new_activated_device_count":null,"online_device_count":2,"active_device_count":3,"total_real_traffic_gb":0.61,"per_user_average_gb":0.31,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.38},{"group_value":"CS1","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null},{"group_value":"csdp333","purchased_device_count":1,"activated_device_count":0,"activation_rate":0,"new_activated_device_count":null,"online_device_count":0,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":1.97},{"group_value":"tst1","purchased_device_count":1,"activated_device_count":1,"activation_rate":1,"new_activated_device_count":null,"online_device_count":1,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":0,"forecast_average_including_zero_gb":0,"forecast_average_excluding_zero_gb":null}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 汇总:单维度分组 business_owner
原始文件:`/tmp/au26015/raw/19_summary_group_business_owner.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-16T23:59:59%2B08:00&group_by=business_owner' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 1519
X-Request-Id: dc47f152-3ef3-4fab-9880-a060d879eb81
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"business_owner","group_name":"业务员","totals":{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77},"items":[{"group_value":"AUG26015-业务员乙","purchased_device_count":3,"activated_device_count":3,"activation_rate":1,"new_activated_device_count":null,"online_device_count":2,"active_device_count":2,"total_real_traffic_gb":0.42,"per_user_average_gb":0.21,"forecast_average_including_zero_gb":0.39,"forecast_average_excluding_zero_gb":0.39},{"group_value":"AUG26015-业务员甲","purchased_device_count":4,"activated_device_count":1,"activation_rate":0.25,"new_activated_device_count":null,"online_device_count":0,"active_device_count":1,"total_real_traffic_gb":0.2,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":0.38},{"group_value":"lxp","purchased_device_count":6,"activated_device_count":4,"activation_rate":0.67,"new_activated_device_count":null,"online_device_count":3,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":0.35,"forecast_average_including_zero_gb":0.66,"forecast_average_excluding_zero_gb":1.97}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 实名逆转:当日汇总(含新增激活数)
原始文件:`/tmp/au26015/raw/20_reversal_new_negative.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-17T00:00:00%2B08:00&end_time=2026-09-17T23:59:59%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 826
X-Request-Id: 5ad631f4-b72a-4fc9-bff4-8e44f8c39feb
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-17"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72},"items":[{"group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 趋势:按日
原始文件:`/tmp/au26015/raw/21_trend_day.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-trend?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-18T00:00:00%2B08:00&granularity=day' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 1176
X-Request-Id: 8be0dc56-cbce-4925-bef6-ec71d6411a7d
{"code":0,"data":{"granularity":"day","group_by":"","group_name":"全部","points":[{"period":"2026-09-16","group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77},{"period":"2026-09-17","group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":-1,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":0.72},{"period":"2026-09-18","group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":0,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.55,"forecast_average_excluding_zero_gb":0.68}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 趋势:按月(无快照月份不出现)
原始文件:`/tmp/au26015/raw/22_trend_month.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-trend?start_time=2026-08-01T00:00:00%2B08:00&end_time=2026-09-30T00:00:00%2B08:00&granularity=month' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 487
X-Request-Id: 0a185fa6-9c70-43a4-a482-75c9d3728ccc
{"code":0,"data":{"granularity":"month","group_by":"","group_name":"全部","points":[{"period":"2026-09","group_value":"全部","purchased_device_count":14,"activated_device_count":7,"activation_rate":0.5,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.55,"forecast_average_excluding_zero_gb":0.68}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 续费汇总:到期当天存在待生效后续主套餐
原始文件:`/tmp/au26015/raw/23_renewal_summary_d1.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/package-renewal-summary?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-16T23:59:59%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 414
X-Request-Id: 5053e733-936b-4ea5-b2e4-351d5fe6532b
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","due_asset_count":1,"renewed_asset_count":1,"renewal_rate":1,"new_unrenewed_asset_count":0},"items":[{"group_value":"全部","due_asset_count":1,"renewed_asset_count":1,"renewal_rate":1,"new_unrenewed_asset_count":0}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 续费汇总:同资产期内两次到期
原始文件:`/tmp/au26015/raw/24_renewal_range_two_expiries.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/package-renewal-summary?start_time=2026-09-17T00:00:00%2B08:00&end_time=2026-09-18T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 427
X-Request-Id: f8221d38-2611-40fd-a23a-f582b930b413
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-17","2026-09-18"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","due_asset_count":1,"renewed_asset_count":0,"renewal_rate":0,"new_unrenewed_asset_count":1},"items":[{"group_value":"全部","due_asset_count":1,"renewed_asset_count":0,"renewal_rate":0,"new_unrenewed_asset_count":1}]},"msg":"success","timestamp":"2026-09-17T20:05:19+08:00"}
# curl 退出码
0
```
## 续费趋势:按日 + 套餐系列分组
原始文件:`/tmp/au26015/raw/25_renewal_trend_group_series.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/package-renewal-trend?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-18T00:00:00%2B08:00&granularity=day&group_by=package_series' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:19 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 606
X-Request-Id: 35d267a4-7e00-49a0-a690-6f18b093d715
{"code":0,"data":{"granularity":"day","group_by":"package_series","group_name":"套餐系列","points":[{"period":"2026-09-16","group_value":"AUG26015-系列A","due_asset_count":1,"renewed_asset_count":1,"renewal_rate":1,"new_unrenewed_asset_count":0},{"period":"2026-09-17","group_value":"AUG26015-系列A","due_asset_count":1,"renewed_asset_count":0,"renewal_rate":0,"new_unrenewed_asset_count":1},{"period":"2026-09-18","group_value":"AUG26015-系列A","due_asset_count":1,"renewed_asset_count":0,"renewal_rate":0,"new_unrenewed_asset_count":1}]},"msg":"success","timestamp":"2026-09-17T20:05:20+08:00"}
# curl 退出码
0
```
## 超管账号可访问
原始文件:`/tmp/au26015/raw/26_superadmin_allowed.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-16T00:00:00%2B08:00&end_time=2026-09-16T23:59:59%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:20 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 832
X-Request-Id: a2438633-0c09-4de3-ac81-598a12eacfd1
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-16"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77},"items":[{"group_value":"全部","purchased_device_count":13,"activated_device_count":8,"activation_rate":0.62,"new_activated_device_count":null,"online_device_count":5,"active_device_count":4,"total_real_traffic_gb":1.66,"per_user_average_gb":0.33,"forecast_average_including_zero_gb":0.62,"forecast_average_excluding_zero_gb":0.77}]},"msg":"success","timestamp":"2026-09-17T20:05:20+08:00"}
# curl 退出码
0
```
## 采购为零:接口比率空值
原始文件:`/tmp/au26015/raw/27_zero_purchase_null_rate.txt`
```
# 命令
curl -sS --max-time 25 -i -X GET 'http://127.0.0.1:3000http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-15T00:00:00%2B08:00&end_time=2026-09-15T00:00:00%2B08:00' -H 'Authorization: Bearer <token>'
# 原始输出(响应头 + 响应体)
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:20 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 824
X-Request-Id: f3a551b4-9d02-4323-ac93-074f0527cc8d
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-15"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":0,"activated_device_count":0,"activation_rate":null,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null},"items":[{"group_value":"全部","purchased_device_count":0,"activated_device_count":0,"activation_rate":null,"new_activated_device_count":null,"online_device_count":0,"active_device_count":0,"total_real_traffic_gb":0,"per_user_average_gb":null,"forecast_average_including_zero_gb":null,"forecast_average_excluding_zero_gb":null}]},"msg":"success","timestamp":"2026-09-17T20:05:20+08:00"}
# curl 退出码
0
```
## 快照后归属变更不改写历史行
原始文件:`/tmp/au26015/raw/28_ownership_frozen.txt`
```
# 命令
psql: UPDATE tb_device SET shop_id=(一级代理店铺) WHERE virtual_no='AUG26015-A'
# 变更前快照行2026-09-16 归属列)
AUG26015-二级店铺 / AUG26015-一级代理店铺 / AUG26015-代理 / AUG26015-业务员乙 /
# 变更后快照行(历史行不应被改写)
AUG26015-二级店铺 / AUG26015-一级代理店铺 / AUG26015-代理 / AUG26015-业务员乙 /
# 退出码
0
```
## 不变量:七维度分组行之和 = 头行;续费集合为到期集合子集;真流量取值
原始文件:`/tmp/au26015/raw/29_invariants.txt`
```
# 命令
psql: 按 7 个受支持维度分组,比较各分组指标之和与头行值;以及续费/到期去重集合关系
维度 [device_name] 不一致分组数=0
维度 [device_model] 不一致分组数=0
维度 [manufacturer] 不一致分组数=0
维度 [business_user_group_id, business_user_group_name] 不一致分组数=0
维度 [agent_account_id, root_shop_id] 不一致分组数=0
维度 [shop_id] 不一致分组数=0
维度 [business_owner_account_id] 不一致分组数=0
全库 续费资产数>到期资产数 的头行数=0
全库 续费资产不在到期资产集合内的行数=0
真流量合计校验AUG26015-A 两卡 100+25=125.00
# 退出码
0
```
## 受控导出入口:平台账号创建激活情况导出
原始文件:`/tmp/au26015/raw/30_export_create_platform.txt`
```
# 命令
curl -sS --max-time 25 -i -X POST 'http://127.0.0.1:3000/api/admin/operations-reports/activation-summary/export' -H 'Authorization: Bearer <platform token>' -d '{"format":"csv","start_time":"2026-09-16T00:00:00+08:00","end_time":"2026-09-16T23:59:59+08:00","group_by":"device_name"}'
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:05:23 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 218
X-Request-Id: a779fd04-b338-4fee-89a2-e0dfe2130867
{"code":0,"data":{"task_id":74,"task_no":"EXP-20260917-722000","status":1,"status_name":"待处理","message":"导出任务创建成功,系统将异步处理"},"msg":"success","timestamp":"2026-09-17T20:05:23+08:00"}
# curl 退出码
0
```
## B1end_time 晚于最后一个快照日 → has_snapshot=false、指标为 null、items=[](修复后实测)
原始文件:`/tmp/au26015/raw/36_b1_end_time_after_last_snapshot.txt`
```
# 命令
curl -sS -i GET http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-18T00:00:00+08:00&end_time=2026-09-19T00:00:00+08:00
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:06:22 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 189
X-Request-Id: 4a2ff8ae-ce76-407b-9305-b0753aad6473
{"code":0,"data":{"has_snapshot":false,"snapshot_dates":["2026-09-18"],"group_by":"","group_name":"全部","totals":null,"items":[]},"msg":"success","timestamp":"2026-09-17T20:06:22+08:00"}
# curl 退出码
0
```
## B1end_time 落在某快照日零点 → 取该日头行(修复后实测)
原始文件:`/tmp/au26015/raw/37_b1_end_time_at_snapshot_zero.txt`
```
# 命令
curl -sS -i GET http://127.0.0.1:3000/api/admin/operations-reports/activation-summary?start_time=2026-09-18T00:00:00+08:00&end_time=2026-09-18T00:00:00+08:00
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:06:22 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 830
X-Request-Id: f1fd00ae-d719-40c4-8064-63e64a9fc1b5
{"code":0,"data":{"has_snapshot":true,"snapshot_dates":["2026-09-18"],"group_by":"","group_name":"全部","totals":{"group_value":"全部","purchased_device_count":6,"activated_device_count":4,"activation_rate":0.67,"new_activated_device_count":null,"online_device_count":3,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":0.35,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":1.75},"items":[{"group_value":"全部","purchased_device_count":6,"activated_device_count":4,"activation_rate":0.67,"new_activated_device_count":null,"online_device_count":3,"active_device_count":1,"total_real_traffic_gb":1.05,"per_user_average_gb":0.35,"forecast_average_including_zero_gb":0.58,"forecast_average_excluding_zero_gb":1.75}]},"msg":"success","timestamp":"2026-09-17T20:06:23+08:00"}
# curl 退出码
0
```
## B1续费汇总同一回退用例修复后实测
原始文件:`/tmp/au26015/raw/38_b1_renewal_end_time_after_last.txt`
```
# 命令
curl -sS -i GET http://127.0.0.1:3000/api/admin/operations-reports/package-renewal-summary?start_time=2026-09-18T00:00:00+08:00&end_time=2026-09-19T00:00:00+08:00
HTTP/1.1 200 OK
Date: Thu, 17 Sep 2026 12:06:23 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 189
X-Request-Id: 732ac5b9-8d51-4242-b334-9a814ab2a536
{"code":0,"data":{"has_snapshot":false,"snapshot_dates":["2026-09-18"],"group_by":"","group_name":"全部","totals":null,"items":[]},"msg":"success","timestamp":"2026-09-17T20:06:23+08:00"}
# curl 退出码
0
```
## m2 as-of 采购数量(设备 G 创建于快照日次日凌晨)与 m1 到期日判定
原始文件:`/tmp/au26015/raw/39_b1_m2_m1_assertions.txt`
```
# 命令
psql: m2 as-of / m1 到期日判定 / 不变量复算
G_in_D1=0
G_in_D3=1
D1 采购=13 D1 明细行=13
old_form(AT TIME ZONE) 命中 2026-09-15=1
new_form(::date) 命中 2026-09-15=1
D1 续费行中 H=0
头行(日)=采购=0 激活=0 在网=0 活跃=0 用量MB=0.00 到期=0 续费=0
头行(日)=采购=13 激活=8 在网=5 活跃=4 用量MB=1699.00 到期=1 续费=1
头行(日)=采购=14 激活=7 在网=5 活跃=4 用量MB=1699.00 到期=1 续费=0
头行(日)=采购=14 激活=7 在网=5 活跃=4 用量MB=1699.00 到期=1 续费=0
# 退出码
0
```
## m1两种到期日写法的差异纯表达式会话时区 Etc/UTC
原始文件:`/tmp/au26015/raw/40_m1_predicate_difference.txt`
```
# 命令
psql: m1 两种写法的差异(纯表达式,无 fixture< 08:00 的墙钟值才会出现差一天)
naive_cast=2026-09-15 old_form=2026-09-14 session_tz=Etc/UTC
# 退出码
0
```
## 收尾:三表 0 行、fixture 全部删除、schema_migrations=231|dirty=false
原始文件:`/tmp/au26015/raw/35_cleanup_and_final_state.txt`
```
# 命令
psql: 最终状态
snapshot=0 activation=0 renewal=0
fixtures=0 export_tasks=0
schema_migrations version=231 dirty=false
# 端口
39842
# 退出码
0
```