资源页报错

This commit is contained in:
2024-12-30 16:17:12 +08:00
parent 8ca14e05a1
commit 41eabc21b5
2 changed files with 8 additions and 27 deletions

View File

@@ -185,9 +185,6 @@
(select sum(o.pay_money) from orders o where o.course_id=c.course_id and o.status=1) as payMoney,
(select sum(good_num) from course_details d where d.course_id=c.course_id ) as goodNum,
(select count(*) from course_details d where d.course_id=c.course_id ) as courseDetailsCount,
(select count(*) from course_collect d where d.course_id=c.course_id
and date_format(create_time,'%Y-%m-%d')>=date_format(#{startTime},'%Y-%m-%d') and
date_format(create_time,'%Y-%m-%d')<=date_format(#{endTime},'%Y-%m-%d') ) as weekGoodNum,
(select count(*) from course_details cd where c.course_id=cd.course_id and cd.good=1 ) as isRecommend
FROM
course AS c
@@ -217,7 +214,7 @@
<if test='null!= bannerId and bannerId!=0'>
and c.banner_id = #{bannerId}
</if>
<if test="classifyId==0">
<if test="classifyId!=null and classifyId==0">
and c.is_recommend=1
</if>
<if test="over!=null and over==1">
@@ -244,12 +241,6 @@
<if test="sort==null">
order by c.sort asc,c.create_time desc
</if>
<if test="sort!=null and sort==1">
order by goodNum desc
</if>
<if test="sort!=null and sort==2">
order by weekGoodNum desc
</if>
</select>
<select id="selectCourseTitle" resultType="Map">