Skip to content

Marketing And Referral — Technical Map

Route / page map

SurfaceMain page / shell
CampaignCampaignReport.tsx
MarketingMarketingReport.tsx
AffiliateAffiliateReport.tsx
Customer affiliateCustomerAffiliateReport.tsx + affiliate detail/order pages
Referral appAppIntroductionReport.tsx, BranchIntroductionStaff.tsx, BranchIntroductionDetails.tsx

GraphQL / data model map

SurfaceQuery / model chính
CampaignReportCampaign, GetAllReportCampaign, ReportOrder, GetAllReportOrder trên report_campaign, campaign_order, order
MarketingReportSMS, ReportSMSCard trên notification.public.report_sms_customer
AffiliateReportAffiliate, GetAllReportAffiliate trên order, affiliate_user, search_affiliate
Customer affiliateaggregate_affiliate_report, summary_order_affiliate, affiliate_report, order_affiliate, invoice_affiliate
Referral appsearch_branch_referral_summary, get_user_each_branch_referral_summary*, referral

Boundary với module khác

ModuleBoundary kỹ thuật
affiliateCustomer affiliate detail/order detail reuse module affiliate
notificationMarketing/SMS reports sống ở notification DB và remote-rel sang ecommerce campaign
ecommerceCampaign, referral, affiliate payout sources nằm trong ecommerce
cmsVoucher campaign analytics hiện tách khỏi campaign report cổ điển

Rủi ro / Findings kỹ thuật

MứcFinding
CaoSmsReportTab.tsx mutate trực tiếp computed whereClause.value.
CaoAppIntroductionReport.tsx mutate trực tiếp computed groupOptions.
Caomodule.ts khai báo trùng child routes cho ROUTE_APP_BRANCH_INTRODUCTION_STAFFROUTE_BRANCH_INTRODUCTION_DETAILS.
CaoCustomerAffiliateReport có drift filter: FE ghi nghĩa orderDate, backend aggregate lại map sang affiliate_user.created_at.
Trung bìnhExport “all” của customer affiliate đang overwrite bằng page data hiện tại.
Trung bìnhBranchIntroductionStaff map cột/field sai ở nhiều metric.