From 19e023ccfe65c75cd6da6ffa4c3b59d152bc5340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 22 Mar 2022 10:37:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E7=BE=8E=E5=9B=A2=E9=97=A8?= =?UTF-8?q?=E5=BA=97=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/delivery/mtps/store.go | 29 ++++++++++++++++++++----- conf/app.conf | 5 +++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/business/partner/delivery/mtps/store.go b/business/partner/delivery/mtps/store.go index 1ef1f3d92..ab17da115 100644 --- a/business/partner/delivery/mtps/store.go +++ b/business/partner/delivery/mtps/store.go @@ -10,7 +10,6 @@ import ( "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" - "time" ) const ( @@ -102,18 +101,36 @@ func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorSt // CourierStatus: model.StoreStatusOpened, // AuditStatus: model.StoreAuditStatusOnline, } - _, err = api.MtpsAPI.CheckOrder(shopInfo.ShopID, shopInfo.ShopAddress, int64(shopInfo.ShopLng), int64(shopInfo.ShopLat), time.Now().Unix()) + + //_, _, err = api.MtpsAPI.PreCreateByShop(&mtpsapi.PreCreateByShopParam{ + // DeliveryID: time.Now().Unix(), + // OrderID: utils.Int2Str(int(time.Now().Unix() + 200)), + // ShopID: shopInfo.ShopID, + // DeliveryServiceCode: mtpsapi.DeliveryServiceCodeRapid, + // ReceiverName: "test发单", + // ReceiverAddress: shopInfo.ShopAddress, + // ReceiverPhone: shopInfo.ContactPhone, + // ReceiverLng: shopInfo.ShopLng, + // ReceiverLat: shopInfo.ShopLat, + // GoodsValue: 10 / 100, + // GoodsWeight: 0, // 系统重量转换为千克 + // PayTypeCode: 0, + // ExpectedDeliveryTime: mtpsapi.DeliveryServiceCodeRapid, // 4002飞速达,4011快速达,4012及时达,4013集中送 + // OuterOrderSourceDesc: "101", + //}) + + //_, err = api.MtpsAPI.CheckOrder(shopInfo.ShopID, shopInfo.ShopAddress, int64(shopInfo.ShopLng), int64(shopInfo.ShopLat), time.Now().Unix()) //result, err := api.MtpsAPI.GetStoreStatus(shopInfo.ShopName) //if err == nil { // storeDetail.AuditStatus = mtpsOpenTypeToJx(result.DataList[0].OpenType) // storeDetail.CourierStatus = mtpsOpenTypeToJx2(result.DataList[0].OpenType) //} if mtpsapi.IsOpen(err) { - storeDetail.AuditStatus = model.StoreAuditStatusOnline - storeDetail.CourierStatus = model.StoreStatusOpened + storeDetail.AuditStatus = model.StoreAuditStatusOnline // 0 + storeDetail.CourierStatus = model.StoreStatusOpened // 1 } else { - storeDetail.AuditStatus = model.StoreAuditStatusRejected - storeDetail.CourierStatus = model.StoreStatusClosed + storeDetail.AuditStatus = model.StoreAuditStatusRejected // -1 + storeDetail.CourierStatus = model.StoreStatusClosed // -1 } err = nil } diff --git a/conf/app.conf b/conf/app.conf index b7cc5dc26..d19b00375 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -186,6 +186,11 @@ dadaIsProd = false dadaCallbackURL = "http://callback.test.jxc4.com/dadadelivery/msg" dadaSourceID = "73753" +fnAppID = "6a3e2073-1850-413b-9eb7-6c342ec36e1c" +fnAppSecret = "a8248088-a742-4c33-a0db-03aeae00ca7d" +fnMerchantId = "20200818" +fnCallbackURL = "http://callback.jxc4.com/fn/msg" + weixinAppID = "wxbf235770edaabc5c" weixinSecret = "ba32b269a068a5b72486a0beafd171e8" weixinToken = "17_roSCZgkCxhRnyFVtei0KdfHwdGP8PmLzJFhCieka4_X4_d-lgfaTxF6oIS6FE5lkgLbrtstSsO6HyDNHKsHJmpB8YOtJYN4sO-AezdWLF78M2phL0K8xCRjB9YE9-Ci64GCqS50o6LcVqux8ORVbACAFIM"