fix(distribution): 分站挂牌的号主收入记入对应分站钱包

结账和仲裁不再把分销站号主收入写入主站钱包,用户列表也只展示主站余额。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-09-25 17:25:33 +08:00
co-authored by Cursor
parent 940510a826
commit 170e279e71
5 changed files with 61 additions and 6 deletions
@@ -694,3 +694,16 @@ func TestApplyCheckoutPriceView_RoleIsolationAndPlatformFeeHidden(t *testing.T)
t.Fatalf("租客视角必须展示 RenterRefundAmountCent, 实际为: %v", renterDTO.RenterRefundAmountCent)
}
}
func TestOwnerWalletSiteIDFollowsListingSite(t *testing.T) {
if got := ownerWalletSiteID(nil); got != 0 {
t.Fatalf("空挂牌站点 = %d, want 0", got)
}
if got := ownerWalletSiteID(&model.RentalListing{}); got != 0 {
t.Fatalf("主站挂牌站点 = %d, want 0", got)
}
siteID := uint64(3)
if got := ownerWalletSiteID(&model.RentalListing{DistributionSiteID: &siteID}); got != 3 {
t.Fatalf("分站挂牌站点 = %d, want 3", got)
}
}