Appearance
Incentive Policy — Technical Map
Route topology
| Surface | Main wrapper / page |
|---|---|
| Commission / prepaid / expired | CommissionSetting.tsx |
| Affiliate | AffiliateContainer.tsx + AffiliateTab.tsx |
| Promotion wallet | PromotionWallet.tsx |
| KPI setting | KpiSetting.tsx |
| Achievement | Achievement.tsx |
| Bonus / app highlight | CustomerAppSetting.tsx + feature pages |
Data model map
| Surface | Model chính |
|---|---|
| Service commission | role_commission, sub_commission |
| Prepaid card | prepaid_card, prepaid_card_view |
| Expired / check-in / transition bonus | default.app_setting keys |
| Promotion wallet | payment_method row wallet_promotion |
| Affiliate general | app_setting.app_settings.affiliate + affiliate_config |
| Affiliate label | affiliate_user_tag |
| Affiliate policy group | policy, policy_branch, policy_product, policy_tag |
| KPI config | master_data, master_data_type, kpi_metric |
| Achievement | achievement |
| App highlight feature | cms.app_highlight_feature |
Boundary với module khác
| Module | Boundary kỹ thuật |
|---|---|
ecommerce | payment method, prepaid, affiliate policy, KPI metric |
wallet | commission source/runtime request logic |
affiliate | runtime referral and payout logic |
report | KPI/report consumer, wallet_promotion revenue/report impact |
cms | app highlight storage/public read permission |
Rủi ro / Findings kỹ thuật
| Mức | Finding |
|---|---|
| Cao | PromotionWallet assume luôn có row đầu tiên wallet_promotion; data rỗng hoặc shape đổi sẽ dễ văng. |
| Cao | Affiliate general dual-write vào hai nguồn dữ liệu mà không có transaction boundary. |
| Cao | UpdatePolicyGroup xóa sạch branch/product/tag rồi insert lại, dễ để policy group ở trạng thái nửa chừng nếu fail. |
| Cao | AppHighlightFeatureEdit có route create nhưng handler submit chưa có nhánh create rõ ràng. |
| Trung bình | AppHighlightFeature permission drift so với phần còn lại của incentive policy vì mở thêm cho BranchPOS. |