mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-22 20:02:42 +08:00
课件列表报错修复
This commit is contained in:
parent
e13ff1ae25
commit
6776fecfe9
@ -96,9 +96,6 @@
|
|||||||
<when test="sortField == 'created_at'">
|
<when test="sortField == 'created_at'">
|
||||||
ORDER BY `courses`.`created_at` ASC
|
ORDER BY `courses`.`created_at` ASC
|
||||||
</when>
|
</when>
|
||||||
<when test="sortField == 'sort_at'">
|
|
||||||
ORDER BY `courses`.`sort_at` ASC
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
<otherwise>
|
||||||
ORDER BY `courses`.`id` ASC
|
ORDER BY `courses`.`id` ASC
|
||||||
</otherwise>
|
</otherwise>
|
||||||
@ -115,9 +112,6 @@
|
|||||||
<when test="sortField == 'created_at'">
|
<when test="sortField == 'created_at'">
|
||||||
ORDER BY `courses`.`created_at` DESC
|
ORDER BY `courses`.`created_at` DESC
|
||||||
</when>
|
</when>
|
||||||
<when test="sortField == 'sort_at'">
|
|
||||||
ORDER BY `courses`.`sort_at` DESC
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
<otherwise>
|
||||||
ORDER BY `courses`.`id` DESC
|
ORDER BY `courses`.`id` DESC
|
||||||
</otherwise>
|
</otherwise>
|
||||||
|
@ -146,9 +146,9 @@
|
|||||||
SELECT DISTINCT ( `resources`.`type` )
|
SELECT DISTINCT ( `resources`.`type` )
|
||||||
FROM `resources`
|
FROM `resources`
|
||||||
<choose>
|
<choose>
|
||||||
<when test="categoryIds != null and categoryIds != ''">
|
<when test="categoryIds != null and !categoryIds.isEmpty()">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="categoryIds.indexOf('0') == 0">
|
<when test="categoryIds.get(0) == 0">
|
||||||
LEFT JOIN `resource_category` ON `resource_category`.`rid` = `resources`.`id`
|
LEFT JOIN `resource_category` ON `resource_category`.`rid` = `resources`.`id`
|
||||||
WHERE `resources`.`is_hidden` = 0
|
WHERE `resources`.`is_hidden` = 0
|
||||||
AND `resource_category`.`cid` IS NULL
|
AND `resource_category`.`cid` IS NULL
|
||||||
@ -156,7 +156,8 @@
|
|||||||
<otherwise>
|
<otherwise>
|
||||||
INNER JOIN `resource_category` ON `resource_category`.`rid` = `resources`.`id`
|
INNER JOIN `resource_category` ON `resource_category`.`rid` = `resources`.`id`
|
||||||
WHERE `resources`.`is_hidden` = 0
|
WHERE `resources`.`is_hidden` = 0
|
||||||
AND `resource_category`.`cid` IN (#{categoryIds})
|
AND `resource_category`.`cid` IN (<foreach collection="categoryIds" item="tmpId" separator=",">
|
||||||
|
#{tmpId}</foreach>)
|
||||||
</otherwise>
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</when>
|
</when>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user