fix(distribution): 统一分销订单租户管理口径

This commit is contained in:
yml
2026-11-24 22:12:52 +08:00
parent 3ac4052ac5
commit 3cc61615f9
20 changed files with 462 additions and 101 deletions
+1 -2
View File
@@ -552,8 +552,7 @@ func applyTenantOrderScope(query *gorm.DB, ctx context.Context) *gorm.DB {
return query
}
return query.
Where("(o.buyer_tenant_id = ? OR o.source_tenant_id = ?)", tenantID, tenantID).
Where("(o.distribution_site_id IS NULL OR o.distribution_site_id = 0)")
Where("(o.buyer_tenant_id = ? OR o.source_tenant_id = ?)", tenantID, tenantID)
}
func tenantOrderRole(ctx context.Context, order model.RentalOrder) string {