畅销商品

This commit is contained in:
苏尹岚
2019-12-24 11:55:52 +08:00
parent 52ea751e45
commit 86def54ea6

View File

@@ -2190,7 +2190,7 @@ func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNam
var skuNameList []*model.SkuName
//未关注不可售的商品nameID列表
sql := `
SELECT DISTINCT b.name_id
SELECT DISTINCT b.name_id id
FROM store_sku_bind a
JOIN sku b ON a.sku_id = b.id AND b.deleted_at = ?
WHERE a.deleted_at = ?
@@ -2203,7 +2203,7 @@ func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNam
AND a.store_id = ?
AND a.status = ?)
UNION
SELECT DISTINCT a.name_id
SELECT DISTINCT a.name_id id
FROM sku a
LEFT JOIN (SELECT DISTINCT b.name_id
FROM store_sku_bind a
@@ -2239,7 +2239,7 @@ func GetTopSkusByCityCode(ctx *jxcontext.Context, cityCode, storeID int) (skuNam
}
}
} else {
skuNameAndPlaceList = append(skuNameAndPlaceList,skuNameAndPlace...)
skuNameAndPlaceList = append(skuNameAndPlaceList, skuNameAndPlace...)
}
i := 1
for _, v := range skuNameAndPlaceList {