sync: 同步 v1.0.4 并脱敏配置与镜像

This commit is contained in:
MiFaZhan
2026-10-29 14:36:49 +08:00
parent 743e8e6e6e
commit 2206a393f7
516 changed files with 18119 additions and 2253 deletions
@@ -0,0 +1,34 @@
package iot
import (
"context"
"testing"
)
func TestResolvePackageEffectiveSalePriceUsesSystemDefaults(t *testing.T) {
got, err := resolvePackageEffectiveSalePrice(
context.Background(),
nil,
"tenant-1",
0,
0,
packagePriceSource{
PackageCode: "PKG-1",
CostPrice: 10,
TerminalCost: 20,
SysDefaultRatio: 80,
SysDefaultProfit: 1,
SysDefaultTerminalRatio: 50,
SysDefaultTerminalProfit: 2,
},
)
if err != nil {
t.Fatalf("resolvePackageEffectiveSalePrice() error = %v", err)
}
if got.AgentShipmentPrice != 9 {
t.Fatalf("agent shipment price = %v, want 9", got.AgentShipmentPrice)
}
if got.TerminalSalePrice != 12 {
t.Fatalf("terminal sale price = %v, want 12", got.TerminalSalePrice)
}
}