Commit a2a0b8c0 authored by 李尚科's avatar 李尚科

gjj product recommend fix

parent 2115e0c2
Pipeline #8682 passed with stage
in 11 seconds
...@@ -35,7 +35,7 @@ class ProductService extends Service { ...@@ -35,7 +35,7 @@ class ProductService extends Service {
// console.info(keys); // console.info(keys);
let classifies = await ctx.blockModel.RecommendChannelClassify.all({ where: { type: type, valid: 1, key: { $in: keys } } }); let classifies = await ctx.blockModel.RecommendChannelClassify.all({ where: { type: type, valid: 1, key: { $in: keys } } });
// return classifies; // return classifies;
classifies = R.project(['id', 'title', 'description'])(classifies); classifies = R.project(['id', 'key', 'title', 'description'])(classifies);
const classify_ids = R.pluck('id', classifies); const classify_ids = R.pluck('id', classifies);
let options = await ctx.blockModel.RecommendChannelOption.all({ where: { classify_id: { $in: classify_ids }, status: 'online', valid: 1 }, order: [['order', 'asc']] }); let options = await ctx.blockModel.RecommendChannelOption.all({ where: { classify_id: { $in: classify_ids }, status: 'online', valid: 1 }, order: [['order', 'asc']] });
options = R.project(['id', 'title', 'classify_id'])(options); options = R.project(['id', 'title', 'classify_id'])(options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment