Commit 767de537 by mushishixian

Merge branch 'ysx-美金活动价-20230420'

parents 8e720d08 cbf75e8d
Showing with 11 additions and 3 deletions
......@@ -2,11 +2,12 @@ package service
import (
"encoding/json"
"github.com/gogf/gf/util/gconv"
"github.com/tidwall/gjson"
"go_sku_server/model"
"go_sku_server/pkg/common"
"go_sku_server/pkg/e"
"github.com/gogf/gf/util/gconv"
"github.com/tidwall/gjson"
)
type LadderPriceService struct {
......@@ -44,7 +45,14 @@ func (LP *LadderPriceService) GetPriceInfoByNum(ladderPriceRequest model.LadderP
if (goodsType == 1 || goodsType == 2) && acType != 1 && ladderPriceRequest.Currency != 1 { //美元
res["price_us"] = ladderPriceOne.Get("price_us").Float()
res["price_us_total"] = common.MyRound(gconv.Float64(res["price_us"])*gconv.Float64(num), 4)
goodsInfo["ac_type"] = 0
priceAcUs := ladderPriceOne.Get("price_ac_us").Float()
if priceAcUs == 0 {
goodsInfo["ac_type"] = 0
}
if priceAcUs != 0 {
res["price_ac_us"] = priceAcUs
res["price_ac_us_total"] = common.MyRound(priceAcUs*gconv.Float64(num), 4)
}
} else { //人民币
res["price_cn"] = ladderPriceOne.Get("price_cn").Float()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment