mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-25 20:35:35 +08:00
增加资源无分类查询
This commit is contained in:
@@ -27,4 +27,11 @@
|
||||
FROM `resource_course_category`
|
||||
GROUP BY `resource_course_category`.`category_id`;
|
||||
</select>
|
||||
|
||||
<select id="getNoneCategoryCount" resultType="java.lang.Integer">
|
||||
SELECT count(DISTINCT `courses`.`id`) AS `total`
|
||||
FROM `courses`
|
||||
LEFT JOIN `resource_course_category` ON `resource_course_category`.`course_id` = `courses`.`id`
|
||||
WHERE `resource_course_category`.`course_id` IS NULL;
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -36,4 +36,12 @@
|
||||
GROUP BY `resource_category`.`cid`;
|
||||
</select>
|
||||
|
||||
<select id="getNoneCategoryCount" resultType="java.lang.Integer">
|
||||
SELECT count(DISTINCT `resources`.`id`) AS `total`
|
||||
FROM `resources`
|
||||
LEFT JOIN `resource_category` ON `resource_category`.`rid` = `resources`.`id`
|
||||
WHERE `resources`.`type` = #{type}
|
||||
AND `resource_category`.`cid` IS NULL;
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user