From 716b08f775aa5bdeba46aaabd5a9f2fbc0fe6975 Mon Sep 17 00:00:00 2001 From: timerzz Date: Mon, 2 Sep 2024 21:19:23 +0800 Subject: [PATCH] =?UTF-8?q?feat=20CalculateProviderPrice=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0originalPrice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- structs/utils/calculate-process.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/structs/utils/calculate-process.go b/structs/utils/calculate-process.go index d6da1a1..60dc8da 100644 --- a/structs/utils/calculate-process.go +++ b/structs/utils/calculate-process.go @@ -7,6 +7,7 @@ import ( ) func CalculateProviderPrice(calculates []v2.CalculateProcess, env map[string]float64) (p v2.ProviderPrice) { + p.OriginalPrice = env["originalPrice"] var calculateStrings = make([]string, 0, len(calculates)) for _, c := range calculates { process, price := c.Run(env) @@ -23,6 +24,7 @@ func CalculateProviderPrice(calculates []v2.CalculateProcess, env map[string]flo } func CalculateSellerPrice(calculates []v2.CalculateProcess, env map[string]float64) (p v2.SellerPrice) { + p.OriginalPrice = env["originalPrice"] var calculateStrings = make([]string, 0, len(calculates)) for _, c := range calculates { process, price := c.Run(env)