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