1
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/misc"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm"
|
||||
@@ -5900,6 +5902,7 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
|
||||
//获取门店信息
|
||||
var (
|
||||
storeID []int
|
||||
storeScore = 0
|
||||
storeInfos []StoreInfo
|
||||
storeDeductionInfo StoreDeductionInfo
|
||||
storeDeductionInfos []StoreDeductionInfo
|
||||
@@ -5926,20 +5929,23 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
|
||||
return nil, "获取门店品牌信息失败", err
|
||||
}
|
||||
//获取门店每周评分
|
||||
//storeScore, err := misc.GetWeeklyStoreScore(v.ID, 0)
|
||||
if scores, err := misc.GetWeeklyStoreScore(v.ID, 0); err == nil && len(scores) > 0 {
|
||||
storeScore = scores[0].TotalScore
|
||||
}
|
||||
|
||||
storeInfo := StoreInfo{
|
||||
StoreID: v.ID,
|
||||
StoreName: v.Name,
|
||||
OpenTime1: v.OpenTime1,
|
||||
CloseTime1: v.CloseTime1,
|
||||
OpenTime2: v.OpenTime2,
|
||||
CloseTime2: v.CloseTime2,
|
||||
Status: v.Status,
|
||||
Distance: v.Distance,
|
||||
Address: v.Address,
|
||||
BrandName: brandInfos.Name,
|
||||
BrandLogo: brandInfos.Logo,
|
||||
StoreID: v.ID,
|
||||
StoreName: v.Name,
|
||||
OpenTime1: v.OpenTime1,
|
||||
CloseTime1: v.CloseTime1,
|
||||
OpenTime2: v.OpenTime2,
|
||||
CloseTime2: v.CloseTime2,
|
||||
Status: v.Status,
|
||||
Distance: v.Distance,
|
||||
Address: v.Address,
|
||||
BrandName: brandInfos.Name,
|
||||
BrandLogo: brandInfos.Logo,
|
||||
StoreWeeklyScore: storeScore,
|
||||
}
|
||||
storeInfos = append(storeInfos, storeInfo)
|
||||
//获取门店减免策略
|
||||
|
||||
Reference in New Issue
Block a user