|
@@ -36,7 +36,7 @@
|
36
|
36
|
<!--获取地址-->
|
37
|
37
|
<select id="getPath" resultType="com.xhkjedu.slive.model.recordserver.LRecordserver">
|
38
|
38
|
select r.rsid,r.rspath from(select r.rsid,r.rspath
|
39
|
|
- ,(r.rsmaxnum-count(case when cs.sectionid is not null then csp.pbid else null end))synum
|
|
39
|
+ ,(r.rsmaxnum-count(distinct case when cs.sectionid is not null then cs.sectionid else null end))synum
|
40
|
40
|
from l_recordserver r left join l_course_section_playback csp on r.rsid=csp.rsid
|
41
|
41
|
left join l_course_section cs on csp.sectionid=cs.sectionid and cs.sectionstate=2
|
42
|
42
|
where r.rsstate=1 group by r.rsid having synum!=0)r order by synum desc,rand() limit 1
|