|
@@ -66,14 +66,15 @@ func GoodsPayCreate(c *gin.Context) { |
|
|
|
|
|
|
|
|
for _, v := range req.GoodsInfo { |
|
|
for _, v := range req.GoodsInfo { |
|
|
tmp := model.OrderGoods{ |
|
|
tmp := model.OrderGoods{ |
|
|
Oid: order.Oid, |
|
|
|
|
|
GoodsId: utils.StrToInt64(v.GoodsId), |
|
|
|
|
|
GoodsTitle: goodsMap[utils.StrToInt64(v.GoodsId)].Title, |
|
|
|
|
|
SkuId: utils.StrToInt64(v.SkuId), |
|
|
|
|
|
SkuCode: skuMap[utils.StrToInt64(v.SkuId)].SkuCode, |
|
|
|
|
|
Sku: skuMap[utils.StrToInt64(v.SkuId)].Sku, |
|
|
|
|
|
Num: utils.StrToInt(v.Num), |
|
|
|
|
|
Price: skuPrice[v.SkuId], |
|
|
|
|
|
|
|
|
Oid: order.Oid, |
|
|
|
|
|
GoodsId: utils.StrToInt64(v.GoodsId), |
|
|
|
|
|
GoodsTitle: goodsMap[utils.StrToInt64(v.GoodsId)].Title, |
|
|
|
|
|
SkuId: utils.StrToInt64(v.SkuId), |
|
|
|
|
|
SkuCode: skuMap[utils.StrToInt64(v.SkuId)].SkuCode, |
|
|
|
|
|
Sku: skuMap[utils.StrToInt64(v.SkuId)].Sku, |
|
|
|
|
|
Num: utils.StrToInt(v.Num), |
|
|
|
|
|
Price: skuPrice[v.SkuId], |
|
|
|
|
|
EnterpriseId: utils.StrToInt(req.EnterpriseId), |
|
|
} |
|
|
} |
|
|
goodsTotal[tmp.GoodsId] += tmp.Num |
|
|
goodsTotal[tmp.GoodsId] += tmp.Num |
|
|
orderGoods = append(orderGoods, tmp) |
|
|
orderGoods = append(orderGoods, tmp) |
|
|