From fca7283d9b7700eac5f18d3b5c3e8160bd73291f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 18 Jan 2024 11:30:15 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store.go | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index a553df1f8..12fa98d47 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -6403,24 +6403,19 @@ func BatchGetMTStoreLogos(vendorOrgCode string, mtStoreIDs []string) (storeLogos //批量更新美团门店logos func BatchUpdateMTStoreLogos(vendorOrgCode string, relInfo []MtRelInfo) (hint string) { + param := map[string]interface{}{} + if len(relInfo[0].PicUrl) > 0 { + param["pic_url"] = relInfo[0].PicUrl + } for _, v := range relInfo { if len(v.PicUrl) == 0 && len(v.Address) == 0 { return "暂无需要更新数据" } - param := map[string]interface{}{} - if len(v.PicUrl) > 0 { - param["pic_url"] = v.PicUrl - } if len(v.Address) > 0 { param["address"] = v.Address } - - storeDetail, err1 := dao.GetStoreDetailForDD(dao.GetDB(), 0, model.VendorIDMTWM, v.PoiCode, "") - if err1 != nil { - hint += fmt.Sprintf("%s:%v\n", v.PoiCode, err1) - } - globals.SugarLogger.Debugf("BatchUpdateMTStoreLogos param=%s", utils.Format4Output(param, false)) - if err := mtwm.GetAPI(vendorOrgCode, storeDetail.Store.ID, "").PoiSave(v.PoiCode, param); err != nil { + apiObj := mtwm.GetAPI(vendorOrgCode, 0, v.PoiCode) + if err := apiObj.PoiSave(v.PoiCode, param); err != nil { hint += fmt.Sprintf("%s:%v\n", v.PoiCode, err) } }