This commit is contained in:
gazebo
2019-09-06 18:49:20 +08:00
parent ecaddecade
commit b1309e90ff
2 changed files with 4 additions and 3 deletions

View File

@@ -118,8 +118,8 @@ func getZengSkus(orderID string, orderMan map[string]interface{}) (skus []*model
discounts, _ := orderMan["discount"].([]interface{})
for _, v := range discounts {
discount := v.(map[string]interface{})
discountMoney += utils.Interface2Int64WithDefault(discount["fee"], 0)
if utils.Interface2String(discount["type"]) == ebaiapi.OrderSkuDiscountTypeZeng {
discountType := utils.Interface2String(discount["type"])
if discountType == ebaiapi.OrderSkuDiscountTypeZeng {
sku := &model.OrderSku{
VendorOrderID: orderID,
VendorID: model.VendorIDEBAI,
@@ -131,6 +131,7 @@ func getZengSkus(orderID string, orderMan map[string]interface{}) (skus []*model
}
skus = append(skus, sku)
}
discountMoney += utils.Interface2Int64WithDefault(discount["fee"], 0)
}
return skus, discountMoney
}