畅销商品

This commit is contained in:
苏尹岚
2019-12-24 17:27:06 +08:00
parent a2fe344e18
commit ae043ed566
2 changed files with 37 additions and 0 deletions

View File

@@ -2235,6 +2235,10 @@ func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNam
}
for _, v := range skuNameAndPlace {
if skuNameMap[v.ID] != nil {
midPrice, err := dao.GetMidPriceByNameID(db, cityCode, v.ID, utils.Time2Date(time.Now().AddDate(0, 0, -1)))
if err == nil {
v.Price = midPrice
}
v.Type = skuNameMap[v.ID].BrandID
skuNameAndPlaceList = append(skuNameAndPlaceList, v)
}