1
This commit is contained in:
@@ -90,7 +90,7 @@ func (d DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee i
|
||||
weight int
|
||||
productDetail []*sfps2.ProductDetail
|
||||
)
|
||||
if order.Weight >= 49500 {
|
||||
if order.Weight >= 49500 || order.Weight <= model.NO {
|
||||
weight = 49500
|
||||
} else {
|
||||
weight = order.Weight
|
||||
@@ -127,10 +127,17 @@ func (d DeliveryHandler) CreateWaybill(order *model.GoodsOrder, maxDeliveryFee i
|
||||
},
|
||||
}
|
||||
|
||||
for _, v := range order.Skus {
|
||||
if len(order.Skus) != model.NO {
|
||||
for _, v := range order.Skus {
|
||||
productDetail = append(productDetail, &sfps2.ProductDetail{
|
||||
ProductName: v.SkuName,
|
||||
ProductNum: int64(v.Count),
|
||||
})
|
||||
}
|
||||
} else {
|
||||
productDetail = append(productDetail, &sfps2.ProductDetail{
|
||||
ProductName: v.SkuName,
|
||||
ProductNum: int64(v.Count),
|
||||
ProductName: "本地暂无商品储存信息",
|
||||
ProductNum: int64(model.YES),
|
||||
})
|
||||
}
|
||||
param.OrderDetail.ProductDetail = productDetail
|
||||
@@ -192,13 +199,15 @@ func (d DeliveryHandler) CancelWaybill(bill *model.Waybill, cancelReasonID int,
|
||||
func (d DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo *partner.WaybillFeeInfo, err error) {
|
||||
var (
|
||||
weight int
|
||||
//productDetail []*sfps2.ProductDetail
|
||||
)
|
||||
if order.Weight >= 49500 {
|
||||
|
||||
// 默认重量
|
||||
if order.Weight >= 49500 || order.Weight <= 0 {
|
||||
weight = 49500
|
||||
} else {
|
||||
weight = order.Weight
|
||||
}
|
||||
|
||||
store, err := dao.GetStoreDetail(dao.GetDB(), getReallyStoreID(order.StoreID, order.JxStoreID), 0, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user