修改美团价格
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"crypto/sha1"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sort"
|
||||
@@ -179,6 +180,21 @@ func (c *DeliveryHandler) callbackMsg2Waybill(msg *mtpsapi.CallbackOrderMsg) (re
|
||||
func (c *DeliveryHandler) GetWaybillFee(order *model.GoodsOrder) (deliveryFeeInfo *partner.WaybillFeeInfo, err error) {
|
||||
db := dao.GetDB()
|
||||
deliveryFeeInfo = &partner.WaybillFeeInfo{}
|
||||
api.MtpsAPI.PreCreateByShop(&mtpsapi.PreCreateByShopParam{
|
||||
DeliveryID: time.Now().Unix()*100 + int64(rand.Intn(2)),
|
||||
OrderID: order.VendorOrderID,
|
||||
ShopID: utils.Int2Str(order.StoreID),
|
||||
DeliveryServiceCode: mtpsapi.DeliveryServiceCodeIntime,
|
||||
ReceiverName: order.ConsigneeName,
|
||||
ReceiverAddress: order.ConsigneeAddress,
|
||||
ReceiverPhone: order.ConsigneeMobile,
|
||||
ReceiverLng: order.ConsigneeLng,
|
||||
ReceiverLat: order.ConsigneeLat,
|
||||
GoodsValue: utils.Int64ToFloat64(order.ActualPayPrice),
|
||||
GoodsWeight: utils.Int2Float64(order.Weight),
|
||||
PayTypeCode: 0,
|
||||
OuterOrderSourceDesc: "101",
|
||||
})
|
||||
deliveryFeeInfo.RefDeliveryFee, deliveryFeeInfo.RefAddFee, err = delivery.CalculateOrderDeliveryFee(order, time.Now(), db)
|
||||
if err == nil {
|
||||
if _, err = c.getMTPSShopID(order, db); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user