This commit is contained in:
邹宗楠
2023-02-13 17:54:53 +08:00
parent 3e2ccf0d0b
commit 4b21127fcd

View File

@@ -1090,8 +1090,8 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
nowPrice, _ := payload["price"].(json.Number).Int64()
if skuName.Price != int(nowPrice) && nowPrice != 0 {
i := payload["skus"].([]aa)
for _, v := range i {
for _, v1 := range payload["skus"].([]interface{}) {
v := v1.(aa)
var skuPrice int64 = 0
if payload["unit"] == "份" { // 商品规格等于份的时候,标准重量保持为500g
skuPrice = int64(v.SpecQuality/500) * nowPrice