From 37aa7e43bd390afcb97d54ceaa7893e75fd850a0 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 19 Jul 2023 09:22:33 +0800 Subject: [PATCH 1/3] 1 --- platformapi/sfps2/order.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platformapi/sfps2/order.go b/platformapi/sfps2/order.go index 94fa7fcc..01fc8656 100644 --- a/platformapi/sfps2/order.go +++ b/platformapi/sfps2/order.go @@ -15,6 +15,8 @@ func (a *API) PreCreateOrder(preOrder *PreCreateOrderReq) (price float64, err er preOrder.PushTime = time.Now().Unix() preOrder.DevId = a.devId resp := a.HttpPostJson("precreateorder", preOrder) + globals.SugarLogger.Debugf("sfps PreCreateOrder:preOrder=%s", utils.Format4Output(preOrder, false)) + globals.SugarLogger.Debugf("sfps PreCreateOrder:resp=%s", utils.Format4Output(resp, false)) if resp.HttpStatusCode != HttpStatusSuccessCode { return 0, errors.New("HTTP请求错误,请检查重试") } @@ -36,8 +38,9 @@ func (a *API) CreateOrder(order *CreateOrderReq) (sfOrderID, sfBillID string, to order.PushTime = time.Now().Unix() order.Version = DefaultVersion order.DevId = a.devId - globals.SugarLogger.Debugf("CreateOrder req=%s", utils.Format4Output(order, false)) + globals.SugarLogger.Debugf("sfps CreateOrder req=%s", utils.Format4Output(order, false)) resp := a.HttpPostJson("createorder", order) + globals.SugarLogger.Debugf("sfps CreateOrder:resp=%s", utils.Format4Output(resp, false)) if resp.HttpStatusCode != HttpStatusSuccessCode { return "", "", 0, 0, errors.New("HTTP请求错误,请检查重试") } @@ -62,6 +65,8 @@ func (a *API) PreCancelOrder(sfOrderID string) (deductionFee float64, err error) PushTime: time.Now().Unix(), } resp := a.HttpPostJson("precancelorder", param) + globals.SugarLogger.Debugf("sfps precancelorder:param=%s", utils.Format4Output(param, false)) + globals.SugarLogger.Debugf("sfps precancelorder:resp=%s", utils.Format4Output(resp, false)) if resp.HttpStatusCode != HttpStatusSuccessCode { return 0, errors.New("HTTP请求错误,请检查重试") } From f998e4b1f7d77f803dac92b8922af5633873427b Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 19 Jul 2023 10:47:00 +0800 Subject: [PATCH 2/3] 1 --- platformapi/sfps2/sf_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/sfps2/sf_model.go b/platformapi/sfps2/sf_model.go index ae76e7d8..62c7d978 100644 --- a/platformapi/sfps2/sf_model.go +++ b/platformapi/sfps2/sf_model.go @@ -16,7 +16,7 @@ const ( FailCode = -1 FailMsg = "fail" //SFShopStoreID = "3263670062849" //测试店铺ID - SFShopStoreID = "3270246375697" //正式店铺ID + SFShopStoreID = "3270357468929" //正式店铺ID DefaultVersion = 19 //参照文档主版本号填写 如:文档版本号1.9,version=19,推荐使用版本19 ) From eea74e52755ec92048dc6580a8c8afb3a31c69ee Mon Sep 17 00:00:00 2001 From: richboo111 Date: Wed, 19 Jul 2023 14:02:41 +0800 Subject: [PATCH 3/3] 1 --- platformapi/sfps2/sf_model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformapi/sfps2/sf_model.go b/platformapi/sfps2/sf_model.go index 62c7d978..890242f2 100644 --- a/platformapi/sfps2/sf_model.go +++ b/platformapi/sfps2/sf_model.go @@ -164,7 +164,7 @@ type PreCreateOrderReq struct { type PreCreateOrderResp struct { ChargePriceList *ChargePriceList `json:"charge_price_list"` DeliveryType float64 `json:"delivery_type"` //0:预约送达单 1:立即单 3:预约上门单 - EstimateCouponDetail []interface{} `json:"estimate_coupon_detail"` + EstimateCouponDetail interface{} `json:"estimate_coupon_detail"` EstimateCouponTotalFee float64 `json:"estimate_coupon_total_fee"` EstimatePayMoney float64 `json:"estimate_pay_money"` ExpectTime float64 `json:"expect_time"`