畅销商品

This commit is contained in:
苏尹岚
2019-12-24 17:51:27 +08:00
parent afd3bbfea3
commit e811b3fc75
2 changed files with 9 additions and 7 deletions

View File

@@ -2235,8 +2235,8 @@ 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 {
midPrice, _ := dao.GetMidPriceByNameID(db, cityCode, v.ID, utils.Time2Date(time.Now().AddDate(0, 0, -1)))
if midPrice != 0 {
v.Price = midPrice
}
v.Type = skuNameMap[v.ID].BrandID