关闭美团门店校验

This commit is contained in:
邹宗楠
2022-03-22 10:37:44 +08:00
parent 6ef8d042d9
commit 19e023ccfe
2 changed files with 28 additions and 6 deletions

View File

@@ -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
}

View File

@@ -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"