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 {