添加包装费
This commit is contained in:
@@ -245,10 +245,8 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
}
|
||||
}
|
||||
ignoreSkuMap := make(map[int]int)
|
||||
// detail := result["detail"].([]interface{})
|
||||
multiSkuMap := make(map[int]int)
|
||||
for _, product := range detail {
|
||||
// product := product2.(map[string]interface{})
|
||||
skuName := product["food_name"].(string)
|
||||
skuID := utils.Interface2String(product["sku_id"])
|
||||
sku := &model.OrderSku{
|
||||
@@ -296,9 +294,6 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
if sku.SalePrice < 0 {
|
||||
sku.SalePrice = jxutils.StandardPrice2Int(utils.MustInterface2Float64(product["price"]))
|
||||
}
|
||||
// if product["isGift"].(bool) {
|
||||
// sku.SkuType = 1
|
||||
// }
|
||||
order.Skus = append(order.Skus, sku)
|
||||
multiSkuMap[sku.SkuID]++
|
||||
}
|
||||
@@ -308,6 +303,9 @@ func (p *PurchaseHandler) Map2Order(orderData map[string]interface{}) (order *mo
|
||||
}
|
||||
}
|
||||
|
||||
// 包装袋金额设置
|
||||
store, _ := dao.GetStoreDetail(dao.GetDB(), order.JxStoreID, order.VendorID, order.VendorOrgCode)
|
||||
order.PackagePrice = store.PackageSetting
|
||||
jxutils.RefreshOrderSkuRelated(order)
|
||||
return order
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user