首页查询优化

This commit is contained in:
谭凯凯
2024-12-30 18:45:50 +08:00
committed by Tankaikai
parent dd59c4577e
commit 0223eccd04

View File

@@ -38,11 +38,11 @@
c.wx_show as wxShow,
c.dy_show as dyShow,
c.sort,
0 as goodNum,
round(10000*rand(),0) as goodNum,
(select count(*) from course_details d where d.course_id=c.course_id ) as courseDetailsCount,
null AS courseDetailsName,
null AS courseDetailsId,
0 as weekGoodNum,
round(10000*rand(),0) as weekGoodNum,
0 as isRecommend
FROM
course AS c
@@ -93,10 +93,8 @@
<if test="dyCourse!=null">
and c.dy_status=4
</if>
order by c.sort asc,c.create_time desc
<!--
<if test="sort==null">
order by c.sort asc
order by c.sort asc,c.create_time desc
</if>
<if test="sort!=null and sort==1">
order by goodNum desc
@@ -104,7 +102,6 @@
<if test="sort!=null and sort==2">
order by weekGoodNum desc
</if>
-->
</select>
<select id="selectCourseAdmin" resultType="Map">