11
This commit is contained in:
@@ -10,6 +10,7 @@ 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 (
|
||||
@@ -118,21 +119,22 @@ func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorSt
|
||||
// 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())
|
||||
//shopInfo.ShopLng = 121345878
|
||||
//shopInfo.ShopLat = 3115628
|
||||
_, 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 // 0
|
||||
storeDetail.CourierStatus = model.StoreStatusOpened // 1
|
||||
} else {
|
||||
storeDetail.AuditStatus = model.StoreAuditStatusRejected // -1
|
||||
storeDetail.CourierStatus = model.StoreStatusClosed // -1
|
||||
}
|
||||
err = nil
|
||||
//if mtpsapi.IsOpen(err) {
|
||||
storeDetail.AuditStatus = model.StoreAuditStatusOnline // 0
|
||||
storeDetail.CourierStatus = model.StoreStatusOpened // 1
|
||||
//} else {
|
||||
// storeDetail.AuditStatus = model.StoreAuditStatusRejected // -1
|
||||
// storeDetail.CourierStatus = model.StoreStatusClosed // -1
|
||||
//}
|
||||
//err = nil
|
||||
}
|
||||
return storeDetail, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user