Commit c71dc91c by huangchengyi

1.0

parent b7123cb3
Showing with 4 additions and 2 deletions
...@@ -3,6 +3,7 @@ package service ...@@ -3,6 +3,7 @@ package service
import ( import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/iancoleman/orderedmap" "github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"go_sku_server/model" "go_sku_server/model"
"go_sku_server/pkg/common" "go_sku_server/pkg/common"
...@@ -238,15 +239,16 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context,goodsIds []string, ch ch ...@@ -238,15 +239,16 @@ func (qs *ZiyingService) ZyGoodsDetail(ctx *gin.Context,goodsIds []string, ch ch
if v.Get("purchases").String() == "" { if v.Get("purchases").String() == "" {
continue; continue;
} }
price_cn := php2go.Round(v.Get("price_cn").Float()*10000)/10000
if PriceAcXi == 0 { if PriceAcXi == 0 {
ladderPrice = append(ladderPrice, model.LadderPrice{ ladderPrice = append(ladderPrice, model.LadderPrice{
Purchases: v.Get("purchases").Int(), Purchases: v.Get("purchases").Int(),
PriceCn: v.Get("price_cn").Float(), PriceCn: price_cn,
}) })
}else{ }else{
ladderPrice = append(ladderPrice, model.LadderPrice{ ladderPrice = append(ladderPrice, model.LadderPrice{
Purchases: v.Get("purchases").Int(), Purchases: v.Get("purchases").Int(),
PriceCn: v.Get("price_cn").Float(), PriceCn: price_cn,
PriceAc: PriceAcXi, PriceAc: PriceAcXi,
}) })
} }
......
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