京西京东商城测试
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
@@ -54,6 +56,7 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
|
||||
var (
|
||||
skuMap = make(map[int]*model.OrderSku)
|
||||
salePrice int64
|
||||
db = dao.GetDB()
|
||||
)
|
||||
for _, sku := range order.Skus {
|
||||
skuMap[sku.SkuID] = sku
|
||||
@@ -82,6 +85,10 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G
|
||||
VendorSkuID: utils.Int2Str(sku.SkuID),
|
||||
SkuID: sku.SkuID,
|
||||
}
|
||||
storeSkus, _ := dao.GetStoresSkusInfo(db, []int{model.JdShopMainStoreID}, []int{sku.SkuID})
|
||||
if len(storeSkus) > 0 {
|
||||
orderSku.VendorSkuID = utils.Int64ToStr(storeSkus[0].JdsID)
|
||||
}
|
||||
if skuMap[sku.SkuID] != nil {
|
||||
orderSku.Name = skuMap[sku.SkuID].SkuName
|
||||
orderSku.UserMoney = skuMap[sku.SkuID].SalePrice * int64(sku.Count)
|
||||
|
||||
Reference in New Issue
Block a user