Appearance
Marketing And Referral — Technical Map
Route / page map
| Surface | Main page / shell |
|---|---|
| Campaign | CampaignReport.tsx |
| Marketing | MarketingReport.tsx |
| Affiliate | AffiliateReport.tsx |
| Customer affiliate | CustomerAffiliateReport.tsx + affiliate detail/order pages |
| Referral app | AppIntroductionReport.tsx, BranchIntroductionStaff.tsx, BranchIntroductionDetails.tsx |
GraphQL / data model map
| Surface | Query / model chính |
|---|---|
| Campaign | ReportCampaign, GetAllReportCampaign, ReportOrder, GetAllReportOrder trên report_campaign, campaign_order, order |
| Marketing | ReportSMS, ReportSMSCard trên notification.public.report_sms_customer |
| Affiliate | ReportAffiliate, GetAllReportAffiliate trên order, affiliate_user, search_affiliate |
| Customer affiliate | aggregate_affiliate_report, summary_order_affiliate, affiliate_report, order_affiliate, invoice_affiliate |
| Referral app | search_branch_referral_summary, get_user_each_branch_referral_summary*, referral |
Boundary với module khác
| Module | Boundary kỹ thuật |
|---|---|
affiliate | Customer affiliate detail/order detail reuse module affiliate |
notification | Marketing/SMS reports sống ở notification DB và remote-rel sang ecommerce campaign |
ecommerce | Campaign, referral, affiliate payout sources nằm trong ecommerce |
cms | Voucher campaign analytics hiện tách khỏi campaign report cổ điển |
Rủi ro / Findings kỹ thuật
| Mức | Finding |
|---|---|
| Cao | SmsReportTab.tsx mutate trực tiếp computed whereClause.value. |
| Cao | AppIntroductionReport.tsx mutate trực tiếp computed groupOptions. |
| Cao | module.ts khai báo trùng child routes cho ROUTE_APP_BRANCH_INTRODUCTION_STAFF và ROUTE_BRANCH_INTRODUCTION_DETAILS. |
| Cao | CustomerAffiliateReport có drift filter: FE ghi nghĩa orderDate, backend aggregate lại map sang affiliate_user.created_at. |
| Trung bình | Export “all” của customer affiliate đang overwrite bằng page data hiện tại. |
| Trung bình | BranchIntroductionStaff map cột/field sai ở nhiều metric. |