1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-10 10:40:03 +08:00

修正课程列表分类筛选条件

This commit is contained in:
xiaochong0302 2024-07-25 11:51:28 +08:00
parent 759253cfc5
commit 17691a6a1b

View File

@ -38,10 +38,11 @@ class CourseList extends LogicService
$childCategoryIds = $categoryService->getChildCategoryIds($params['tc']);
/**
* 构造空记录条件
*/
$params['category_id'] = $childCategoryIds ?: -999;
$parentCategoryIds = [$params['tc']];
$allCategoryIds = array_merge($parentCategoryIds, $childCategoryIds);
$params['category_id'] = $allCategoryIds;
}
$params['published'] = 1;