From c4b62a05dc4e109dc2cd6cc65f35a7b518ace391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B9=B3=E5=87=A1=E6=A2=A6?= Date: Thu, 9 Jul 2020 15:39:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9SetMTPSStatus=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/sync.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index e459345d0..bfade8418 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -1279,32 +1279,32 @@ func SyncSkuExperfixAndWatermark(ctx *jxcontext.Context) (err error) { return err } -func SetMTPSStatus(ctx *jxcontext.Context, StoreId, CourierStatus int) { +func SetMTPSStatus(ctx *jxcontext.Context, storeId, courierStatus int) { globals.SugarLogger.Debug("SetMTPSStatus is start ") - globals.SugarLogger.Debug("StoreId", "CourierStatus", StoreId, CourierStatus) + globals.SugarLogger.Debug("StoreId", "CourierStatus", storeId, courierStatus) /*获取美团门店信息*/ //&& CourierStatus != 0 - if StoreId != 0 { - StoreLists, _ := dao.GetStoreList(nil, []int{StoreId}, nil, nil, nil, "") + if storeId != 0 { + StoreLists, _ := dao.GetStoreList(nil, []int{storeId}, nil, nil, nil, "") StoreInfoList, _ := api.MtpsAPI.GetStoreStatus(StoreLists[0].Name) globals.SugarLogger.Debug("美团查询结果", StoreInfoList) if StoreInfoList == nil || StoreInfoList.DataList == nil { sl := make(map[string]interface{}) sl["vendorStatus"] = 0 - globals.SugarLogger.Debug("因为没找到被修改配送状态的VendorStoreID是", StoreLists[0].Name, StoreId) - UpdateStoreCourierMap(ctx, nil, StoreId, model.VendorIDMTPS, sl, ctx.GetUserName()) + globals.SugarLogger.Debug("因为没找到被修改配送状态的VendorStoreID是", StoreLists[0].Name, storeId) + UpdateStoreCourierMap(ctx, nil, storeId, model.VendorIDMTPS, sl, ctx.GetUserName()) return } if StoreInfoList.DataList[0].OuterPoiID != "" { //若存在且名字不为空,就是找到了 - if StoreInfoList.DataList[0].OpenType != CourierStatus { + if StoreInfoList.DataList[0].OpenType != courierStatus { sl := make(map[string]interface{}) sl["vendorStoreID"] = StoreInfoList.DataList[0].OuterPoiID sl["status"] = StoreInfoList.DataList[0].OpenType sl["vendorStatus"] = StoreInfoList.DataList[0].OpenType globals.SugarLogger.Debugf("被修改配送状态的VendorStoreID是:%s,名称是:%s,美团状态是:%s,本地状态是:%s", StoreInfoList.DataList[0].OuterPoiID, StoreInfoList.DataList[0].PoiName, strconv.Itoa(StoreInfoList.DataList[0].OpenType), strconv.Itoa(StoreLists[0].Status)) - UpdateStoreCourierMap(ctx, nil, StoreId, model.VendorIDMTPS, sl, ctx.GetUserName()) + UpdateStoreCourierMap(ctx, nil, storeId, model.VendorIDMTPS, sl, ctx.GetUserName()) } } } else {