Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
8d49d4f164
|
@ -1769,14 +1769,10 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel
|
|||
StatusLink: order.GetOrderStatusLinkUser(*orderInfo.DeliveryMethod, statusLink),
|
||||
Metadata: orderMetadata,
|
||||
}
|
||||
|
||||
var orderProductList []gmodel.OrderProduct
|
||||
for _, productValue := range orderProduct {
|
||||
var selectColorIndex int64
|
||||
var shoppingCartSnapshotData gmodel.FsShoppingCartData
|
||||
// 购物车对应商品
|
||||
var shoppingCartSnapshotDataMap = make(map[int64]gmodel.FsShoppingCartData, len(shoppingCartSnapshot))
|
||||
for _, shoppingCartSnapshotValue := range shoppingCartSnapshot {
|
||||
if productValue.CartId == shoppingCartSnapshotValue.Id {
|
||||
|
||||
var shoppingCartSnapshotData gmodel.FsShoppingCartData
|
||||
snapshot, err := d.OrderShoppingCartSnapshotHandler(ctx, shoppingCartSnapshotValue.Snapshot)
|
||||
if err != nil {
|
||||
logc.Errorf(ctx, "OrderDetailHandler OrderShoppingCartSnapshotHandler failed, err: %v", err)
|
||||
|
@ -1797,14 +1793,21 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel
|
|||
shoppingCartSnapshotData.Ctime = shoppingCartSnapshotValue.Ctime
|
||||
shoppingCartSnapshotData.Utime = shoppingCartSnapshotValue.Utime
|
||||
shoppingCartSnapshotData.Snapshot = &snapshot
|
||||
|
||||
selectColorIndexV, selectColorIndexE := snapshot["select_color_index"]
|
||||
shoppingCartSnapshotDataMap[shoppingCartSnapshotValue.Id] = shoppingCartSnapshotData
|
||||
}
|
||||
var orderProductList []gmodel.OrderProduct
|
||||
for _, productValue := range orderProduct {
|
||||
var selectColorIndex int64
|
||||
var shoppingCartSnapshotData = shoppingCartSnapshotDataMap[productValue.CartId]
|
||||
var snapshotInfo = shoppingCartSnapshotData.Snapshot
|
||||
if snapshotInfo != nil {
|
||||
var snapshotInfoMap = *snapshotInfo
|
||||
selectColorIndexV, selectColorIndexE := snapshotInfoMap["select_color_index"]
|
||||
if selectColorIndexE {
|
||||
selectColorIndex = selectColorIndexV.(int64)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
var expectedDeliveryTime time.Time
|
||||
if productValue.ExpectedDeliveryTime == nil {
|
||||
expectedDeliveryTime = expectedTime
|
||||
|
|
Loading…
Reference in New Issue
Block a user