修改SetMTPSStatus调用

This commit is contained in:
平凡梦
2020-07-09 11:33:38 +08:00
parent 01a36b65fc
commit 7ed4b2cfab

View File

@@ -1286,19 +1286,17 @@ func SetMTPSStatus(ctx *jxcontext.Context, StoreId, CourierStatus int) {
//&& CourierStatus != 0 //&& CourierStatus != 0
if StoreId != 0 { if StoreId != 0 {
StoreLists, _ := dao.GetStoreList(nil, []int{StoreId}, nil, nil, nil, "") StoreLists, _ := dao.GetStoreList(nil, []int{StoreId}, nil, nil, nil, "")
globals.SugarLogger.Debug("StoreLists[0].Name", StoreLists[0].Name)
StoreInfoList, _ := api.MtpsAPI.GetStoreStatus(StoreLists[0].Name) StoreInfoList, _ := api.MtpsAPI.GetStoreStatus(StoreLists[0].Name)
globals.SugarLogger.Debug("美团查询结果", *StoreInfoList) globals.SugarLogger.Debug("美团查询结果", StoreInfoList)
globals.SugarLogger.Debug("美团查询结果", &StoreInfoList) if StoreInfoList.DataList[0].OuterPoiID != "" {
if StoreInfoList.OuterPoiID != "" {
//若存在且名字不为空,就是找到了 //若存在且名字不为空,就是找到了
if StoreInfoList.OpenType != CourierStatus { if StoreInfoList.DataList[0].OpenType != CourierStatus {
sl := make(map[string]interface{}) sl := make(map[string]interface{})
sl["vendorStoreID"] = StoreInfoList.OuterPoiID sl["vendorStoreID"] = StoreInfoList.DataList[0].OuterPoiID
sl["status"] = StoreInfoList.OpenType sl["status"] = StoreInfoList.DataList[0].OpenType
sl["vendorStatus"] = StoreInfoList.OpenType sl["vendorStatus"] = StoreInfoList.DataList[0].OpenType
globals.SugarLogger.Debugf("被修改配送状态的VendorStoreID是:%s,名称是:%s,美团状态是:%s,本地状态是:%s", globals.SugarLogger.Debugf("被修改配送状态的VendorStoreID是:%s,名称是:%s,美团状态是:%s,本地状态是:%s",
StoreInfoList.OuterPoiID, StoreInfoList.PoiName, strconv.Itoa(StoreInfoList.OpenType), strconv.Itoa(StoreLists[0].Status)) 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())
} }
} }