京东订单

This commit is contained in:
苏尹岚
2020-07-27 12:07:12 +08:00
parent 39a9ac2950
commit 2d725a7e3a
3 changed files with 13 additions and 5 deletions

View File

@@ -159,17 +159,20 @@ func updateOrderBySettleMent(order *model.GoodsOrder, orderSettlement *jdapi.Ord
order.TotalShopMoney = orderSettlement.SettlementAmount
order.PmSubsidyMoney = orderSettlement.PlatOrderGoodsDiscountMoney + orderSettlement.PlatSkuGoodsDiscountMoney
if order.TotalShopMoney > 0 {
stores, _ := dao.GetStoreList(dao.GetDB(), []int{order.StoreID}, nil, nil, nil, "")
stores, _ := dao.GetStoreList(dao.GetDB(), []int{jxutils.GetSaleStoreIDFromOrder(order)}, nil, nil, nil, "")
if len(stores) > 0 {
if stores[0].PayPercentage <= 50 {
order.NewEarningPrice = order.TotalShopMoney * int64((100 - stores[0].PayPercentage/2)) / 100
order.NewEarningPrice = orderSettlement.SettlementAmount * int64((100 - stores[0].PayPercentage/2)) / 100
} else {
order.NewEarningPrice = order.EarningPrice
}
} else {
globals.SugarLogger.Warnf("updateOrderBySettleMent,%v,%v,%v", order.VendorOrderID, orderSettlement.SettlementAmount)
}
} else {
order.NewEarningPrice = order.EarningPrice
}
globals.SugarLogger.Debugf("updateOrderBySettleMent,%v,%v,%v", order.VendorOrderID, order.NewEarningPrice, jxutils.GetSaleStoreIDFromOrder(order))
}
}

View File

@@ -659,7 +659,7 @@ func buildCreateWareParam(storeSku *dao.StoreSkuSyncInfo) (createSkuParamWare *j
}
attrBzq := &jdshopapi.CreateSkuParamAttrs{
AttrID: utils.Int2Str(attrIDs["保质期"]),
AttrValues: []string{"5"},
AttrValues: []string{"5"},
}
attrsProp = append(attrsProp, attrZctj)
attrsProp = append(attrsProp, attrJhl)