thread-master/docs/product/demand-radar/tasks/T570-contact-detail-notes-f...

1.5 KiB
Raw Permalink Blame History

T570 — contact-detail-notes-followup-flag-api

Status: done
Milestone: M4
Kind: feat
Est. change: ~170 lines

Goal

完成後系統應Contact 詳情(含時間軸)、階段推進、備註、待追蹤標記四個端點可用。

Depends on

  • T566、T568

Inputs

  • Spec../spec.md §4.6.4、§4.6.5、§5.2、§9.4CR-03CR-05

Outputs

程式變更(預期路徑)

路徑 動作 說明
apps/backend/generate/api/crm.api edit detailstagenotesfollow-up type
apps/backend/internal/logic/crm/getContactLogic.go edit 詳情+時間軸(分頁)+關聯商機摘要
apps/backend/internal/logic/crm/updateContactStageLogic.go edit 呼叫 T568 Transition
apps/backend/internal/logic/crm/createContactNoteLogic.go edit 備註寫 touch
apps/backend/internal/logic/crm/setContactFollowUpLogic.go edit 設定/解除 needs_follow_up 與天數

行為變更

  • owner_uid 隔離;非本人資源回越權錯誤。
  • 待追蹤端點可同時設定 follow_up_days(預設 3設為 true 時由 T585 建立 FollowUpM5 前僅存旗標)。
  • 非法 stage 值回明確錯誤。

Out of scope

  • mergeT571、成交T572
  • FollowUp 排程M5

Acceptance

  • 詳情含時間軸並可分頁
  • 標記待追蹤後階段不變CR-05
  • 指令:
cd apps/backend && make gen-api && go test ./internal/logic/crm/... -count=1