From feae547e4bf8bd759bbf4a9bb246af329760001b Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 25 Aug 2022 10:45:35 +0800 Subject: [PATCH] home --- business/jxstore/cms/store.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 49d07f1af..36702c5af 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -140,6 +140,7 @@ type Info1 struct { WeeklyScore int `json:"weeklyScore"` //店铺每周评分 } type Info2 struct { + StoreID int `json:"storeID"` //门店ID SkuID int `json:"skuID"` //商品ID SkuName string `json:"skuName"` //商品名字 SkuStatus int `json:"skuStatus"` //商品是否可售状态 1可售 0不可售 @@ -5805,6 +5806,7 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis for _, j := range topSkusInfo { if i.StoreID == j.StoreID { data = Info2{ + StoreID: j.StoreID, SkuID: j.SkuID, SkuName: j.Name, SkuStatus: j.Status, @@ -5817,9 +5819,13 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis } multipleData = append(multipleData, data) if len(multipleData) > 0 { - ans = HomePageInfos{ - Info: i, - Info2: multipleData, + for _, k := range multipleData { + if i.StoreID == k.StoreID { + ans = HomePageInfos{ + Info: i, + Info2: multipleData, + } + } } } else { ans = HomePageInfos{