From 5e32e69b3ebfd067eb5e92d4cbff88d1e311a3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 17 Jun 2020 09:59:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=8E=E5=9B=A2=E9=85=8D=E9=80=81=E5=8F=91?= =?UTF-8?q?=E6=9E=9C=E5=9B=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/delivery/mtps/waybill.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/business/partner/delivery/mtps/waybill.go b/business/partner/delivery/mtps/waybill.go index 7554a24de..09fc6e264 100644 --- a/business/partner/delivery/mtps/waybill.go +++ b/business/partner/delivery/mtps/waybill.go @@ -118,7 +118,6 @@ func (c *DeliveryHandler) pushToGy(waybill *model.Waybill, msg *mtpsapi.Callback params["mt_peisong_id"] = msg.MtPeisongID params["courier_name"] = msg.CourierName params["delivery_id"] = msg.DeliveryID - // params["sign"] = "ec61c8d88a1f864cc2cb1b875177fe1fb1402f05" params["appkey"] = msg.AppKey params["order_id"] = msg.OrderID params["courier_phone"] = msg.CourierPhone @@ -133,6 +132,17 @@ func (c *DeliveryHandler) pushToGy(waybill *model.Waybill, msg *mtpsapi.Callback if err != nil { return } + request.PostForm.Set("mt_peisong_id", msg.MtPeisongID) + request.PostForm.Set("courier_name", msg.CourierName) + request.PostForm.Set("delivery_id", utils.Int64ToStr(msg.DeliveryID)) + request.PostForm.Set("appkey", msg.AppKey) + request.PostForm.Set("order_id", msg.OrderID) + request.PostForm.Set("courier_phone", msg.CourierPhone) + request.PostForm.Set("status", utils.Int2Str(msg.Status)) + request.PostForm.Set("timestamp", utils.Int64ToStr(msg.Timestamp)) + request.PostForm.Set("cancel_reason_id", utils.Int2Str(msg.CancelReasonId)) + request.PostForm.Set("cancel_reason", msg.CancelReason) + request.PostForm.Set("sign", sign) fmt.Println("testgy request : %v", request.FormValue("sign")) request.Header.Set("content_type", "application/x-www-form-urlencoded; charset=UTF-8") cl.Do(request)