Neo
96dae0c778
fix: F1-5b MP-3 + MP-5 沙箱业务日小程序适配 (W1)
MP-3 customer-detail coachTasks.lastService 业务日上界裁剪:
- apps/backend/app/services/customer_service.py
- import as_runtime_today_param 从 late import 提至模块顶部
- _build_coach_tasks 开头取 ref_date,供两段 SQL 共用
- 第一条直查 biz.coach_tasks 加 `AND updated_at < (%s::date + INTERVAL '1 day')::timestamptz`
- 删除原方法内重复 ref_date 调用
- 业务影响:sandbox=2026-04-20 时,customer-detail 的"上次服务"
时间不再展示 sandbox 业务日之后的助教任务更新(沙箱不读未来)
- 测试:apps/backend/tests/test_customer_detail_mp3_lastservice.py
本地通过,因 .gitignore:71 不入仓(同 T1 / af02446 处理方式)
MP-5 coach-service-records 接入 getBusinessClock:
- apps/miniprogram/miniprogram/pages/coach-service-records/coach-service-records.ts
- import getBusinessClock + data 加 clockYear/clockMonth/clockDay 字段
- onLoad 改 async,await getBusinessClock() 取 business_year/month/date
- loadData / switchMonth 4 处 new Date() → clockYear/Month/Day
- 业务影响:sandbox=2026-04-20 时,coach-service-records 默认显示
"2026 年 4 月"业绩(而非 today 月),canGoNext=false 阻止翻到 5 月,
"前 5 日预估金额"规则按 sandbox business_date 判断
双口径验证(weixin-devtools-mcp + DB 直查):
- MP-3 4a live: lastService 最大 04-19(无未来时间)
- MP-3 4b sandbox=4-20: 5-01 任务 task_id=8348/8347 完全消失
- MP-5 4a live: clockYear/Month/Day=2026/5/5,monthLabel="2026年5月"
- MP-5 4b sandbox=4-20: monthLabel="2026年4月" + 35 笔/¥4,657
first group=2026-04-20(后端 SQL 上界裁剪生效)
审计:
- docs/audit/changes/2026-05-05__wave1_f1_5b_mp3_lastservice_upper_bound.md
- docs/audit/changes/2026-05-05__wave1_f1_5b_mp5_coach_service_records_clock.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 18:43:08 +08:00
..
2026-05-05 15:14:29 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-04-20 06:32:07 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-02-19 08:35:13 +08:00
2026-04-20 06:32:07 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:39:13 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:35:42 +08:00
2026-04-06 01:05:06 +08:00
2026-04-20 06:35:42 +08:00
2026-04-20 06:32:58 +08:00
2026-05-04 02:30:19 +08:00
2026-04-20 06:32:58 +08:00
2026-04-20 06:48:27 +08:00
2026-05-04 02:30:19 +08:00
2026-05-04 02:30:19 +08:00
2026-05-04 02:30:19 +08:00
2026-05-04 02:30:19 +08:00
2026-04-22 21:56:46 +08:00
2026-05-02 03:11:39 +08:00
2026-05-04 02:30:19 +08:00
2026-05-04 02:30:19 +08:00
2026-05-04 02:30:19 +08:00
2026-05-02 03:11:39 +08:00
2026-05-03 21:08:13 +08:00
2026-05-04 02:30:19 +08:00
2026-05-04 07:36:20 +08:00
2026-05-04 09:46:27 +08:00
2026-05-05 00:30:10 +08:00
2026-05-04 07:42:51 +08:00
2026-05-04 08:10:57 +08:00
2026-05-04 08:12:12 +08:00
2026-05-04 09:54:35 +08:00
2026-05-05 11:53:08 +08:00
2026-05-05 03:01:48 +08:00
2026-05-05 18:43:08 +08:00
2026-05-05 18:43:08 +08:00
2026-05-05 15:01:51 +08:00
2026-05-05 02:03:43 +08:00
2026-05-05 02:03:20 +08:00