aa
This commit is contained in:
@@ -1533,6 +1533,16 @@ func TransferJdsOrder(ctx *jxcontext.Context, vendorOrderID string, storeID int)
|
||||
for _, sku := range skus {
|
||||
sku.VendorOrderID = order.VendorOrderID
|
||||
sku.ID = 0
|
||||
var storesSku *model.StoreSkuBind
|
||||
sql := `
|
||||
SELECT * FROM store_sku_bind WHERE deleted_at = ? AND store_id = ? AND jds_id = ?
|
||||
`
|
||||
sqlParams := []interface{}{utils.DefaultTimeValue, model.JdShopMainStoreID, sku.VendorSkuID}
|
||||
if err = dao.GetRow(db, &storesSku, sql, sqlParams); err == nil && storesSku != nil {
|
||||
if realStoresSkus, err := dao.GetStoresSkusInfo(db, []int{storeID}, []int{storesSku.SkuID}); err == nil && len(realStoresSkus) > 0 {
|
||||
sku.ShopPrice = int64(realStoresSkus[0].Price)
|
||||
}
|
||||
}
|
||||
order.Skus = append(order.Skus, sku)
|
||||
}
|
||||
setJdsOrderSeq(order)
|
||||
|
||||
@@ -125,6 +125,7 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
||||
}
|
||||
if utils.Str2Float64(msg.BalanceUsed) != 0 {
|
||||
order.ActualPayPrice += jxutils.StandardPrice2Int(utils.Str2Float64(msg.BalanceUsed))
|
||||
order.TotalShopMoney += utils.Float64TwoInt64(math.Round(float64(jxutils.StandardPrice2Int(utils.Str2Float64(msg.BalanceUsed))) * jdshopapi.JdsPayPercentage))
|
||||
}
|
||||
if len(msg.ConsigneeInfo.Mobile) != 11 {
|
||||
order.ConsigneeMobile = Decrypt(msg.ConsigneeInfo.Mobile, msg.VendorOrgCode)
|
||||
|
||||
Reference in New Issue
Block a user