diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index e7431d446..286908e54 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -624,19 +624,19 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64 } deliveryAddress.ConsigneeName = storeDetail2.Name outJxOrder.FromStoreID = fromStoreID - if outJxOrder.Weight > 5000 { - _, freightPrice, err := tryToSplitMatterOrder(outJxOrder) - if err != nil { - return nil, nil, err - } - outJxOrder.FreightPrice = int64(freightPrice) - } else { + // if outJxOrder.Weight > 5000 { + // _, freightPrice, err := tryToSplitMatterOrder(outJxOrder) + // if err != nil { + // return nil, nil, err + // } + // outJxOrder.FreightPrice = int64(freightPrice) + // } else { if outJxOrder.Weight <= 2000 { outJxOrder.FreightPrice = 500 } else { outJxOrder.FreightPrice = utils.Float64TwoInt64(500 + math.Ceil((utils.Int2Float64(outJxOrder.Weight)-2000)/1000)*200) } - } + // } } else { if outJxOrder.FreightPrice > specialFreightPrice { outJxOrder.FreightPrice = specialFreightPrice @@ -761,7 +761,6 @@ func AdjustOrder(ctx *jxcontext.Context, order *model.GoodsOrder, removedSkuList func PickupGoods(order *model.GoodsOrder, isSelfDelivery bool, userName string) (err error) { err = changeOrderStatus(order.VendorOrderID, model.OrderStatusFinishedPickup, "") - err = orderSolutionForWuLiao(order) return err } @@ -770,6 +769,7 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) { var ( db = dao.GetDB() ) + err = changeOrderStatus(order.VendorOrderID, model.OrderStatusDelivering, "") goods, err := dao.QueryOrders(db, order.VendorOrderID, -1, []int{model.VendorIDJX}, -1, utils.ZeroTimeValue, utils.ZeroTimeValue) if err != nil || len(goods) == 0 { return err @@ -781,7 +781,6 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) { prices []string quantities []string ) - err = changeOrderStatus(order.VendorOrderID, model.OrderStatusDelivering, "") for _, v := range orderSkus { skus, err := dao.GetSkus(db, []int{v.SkuID}, nil, nil, nil, nil) if err != nil || len(skus) == 0 { @@ -843,9 +842,6 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) { if err != nil { return err } - if outJxOrder.TotalPrice != v.TotalPrice { - return fmt.Errorf("商品或配送信息发生改变,请重新下单") - } outJxOrder.OrderID = GenOrderNo(jxcontext.AdminCtx) order2, err2 := jxOrder2GoodsOrder(jxcontext.AdminCtx, outJxOrder, deliveryAddress) if err = err2; err == nil { @@ -1290,13 +1286,13 @@ func tryToSplitMatterOrder(jxOrder *JxOrderInfo) (outOrders []*JxOrderInfo, frei break } } - for _, v := range outOrders { - if v.Weight <= 2000 { - freightPrice += 500 - } else { - freightPrice += int(utils.Float64TwoInt64(500 + math.Ceil((utils.Int2Float64(v.Weight)-2000)/1000)*200)) - } - } + // for _, v := range outOrders { + // if v.Weight <= 2000 { + // freightPrice += 500 + // } else { + // freightPrice += int(utils.Float64TwoInt64(500 + math.Ceil((utils.Int2Float64(v.Weight)-2000)/1000)*200)) + // } + // } return outOrders, freightPrice, err } diff --git a/business/partner/purchase/jx/localjx/tonglianpay.go b/business/partner/purchase/jx/localjx/tonglianpay.go index 631a3bdc4..ae9bc3206 100644 --- a/business/partner/purchase/jx/localjx/tonglianpay.go +++ b/business/partner/purchase/jx/localjx/tonglianpay.go @@ -111,7 +111,7 @@ func onTLpayFinished(call *tonglianpayapi.CallBackResult) (err error) { } order, _ := partner.CurOrderManager.LoadOrder(call.CusorderID, model.VendorIDJX) if order.FromStoreID != 0 { - PickupGoods(order, false, "jxadmin") + err = orderSolutionForWuLiao(order) } } else { globals.SugarLogger.Debugf("onTLpayFinished msg:%s, err:%v", utils.Format4Output(call, true), err)