feat(AI资源广场): 优化AI资源排序
This commit is contained in:
parent
6f881dad5c
commit
a5e2efe2df
|
|
@ -162,7 +162,20 @@
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
|
<choose>
|
||||||
|
<when test="resourceCategory != null and resourceCategory !=''">
|
||||||
|
ORDER BY
|
||||||
|
zr.like_count DESC,
|
||||||
|
(select sum(download_count) from sys_file_info sf where FIND_IN_SET(sf.file_id,zr.file_ids)) desc,
|
||||||
|
zr.view_count DESC,
|
||||||
|
zr.update_time DESC,
|
||||||
|
zr.create_time DESC
|
||||||
|
</when>
|
||||||
|
<otherwise>
|
||||||
ORDER BY zr.sort DESC
|
ORDER BY zr.sort DESC
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
@ -190,12 +203,17 @@
|
||||||
<!-- 数据范围过滤 -->
|
<!-- 数据范围过滤 -->
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
<choose>
|
<choose>
|
||||||
<when test="orderByDownloadCount != null and orderByDownloadCount">
|
<when test="resourceCategory != null and resourceCategory !=''">
|
||||||
order by (select sum(download_count) from sys_file_info sf where FIND_IN_SET(sf.file_id,zr.file_ids)) desc
|
ORDER BY
|
||||||
</when>
|
zr.like_count DESC,
|
||||||
<when test="orderByDownloadCount = null and orderByColumn = null and orderByColumn =''">
|
(select sum(download_count) from sys_file_info sf where FIND_IN_SET(sf.file_id,zr.file_ids)) desc,
|
||||||
order by zr.sort DESC
|
zr.view_count DESC,
|
||||||
|
zr.update_time DESC,
|
||||||
|
zr.create_time DESC
|
||||||
</when>
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
ORDER BY zr.sort DESC
|
||||||
|
</otherwise>
|
||||||
</choose>
|
</choose>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue