Browse Source

直播状态、背诵状态搜索

tags/正式3.2.5
王宁 2 years ago
parent
commit
b785aa228f

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CourseMapper.java View File

58
     List<SectionDateVo> listSectionDateForStu(Integer studentid, String timestr);
58
     List<SectionDateVo> listSectionDateForStu(Integer studentid, String timestr);
59
 
59
 
60
     //指定日期的课节列表
60
     //指定日期的课节列表
61
-    List<CourseSectionVo> listSectionsByDate(Integer studentid,String timestr,Integer cstate);
61
+    List<CourseSectionVo> listSectionsByDate(@Param("cp")CourseParams cp);
62
 
62
 
63
     //教师指定月份课程日期数量
63
     //教师指定月份课程日期数量
64
     List<SectionDateVo> listSectionDateForTeacher(@Param("course") CourseParams course);
64
     List<SectionDateVo> listSectionDateForTeacher(@Param("course") CourseParams course);

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CourseService.java View File

538
 
538
 
539
     //指定日期的课节列表
539
     //指定日期的课节列表
540
     public List<CourseSectionVo> listSectionsByDate(CourseParams p){
540
     public List<CourseSectionVo> listSectionsByDate(CourseParams p){
541
-        return courseMapper.listSectionsByDate(p.getStudentid(),p.getTimestr(),p.getCstate());
541
+        return courseMapper.listSectionsByDate(p);
542
     }
542
     }
543
 
543
 
544
     public List<SectionDateVo> listSectionDateForTeacher(CourseParams p) {
544
     public List<SectionDateVo> listSectionDateForTeacher(CourseParams p) {

+ 7
- 8
slive/src/main/resources/mapper/liveplay/CourseMapper.xml View File

296
         left join t_class_student s on c.classid=s.classid
296
         left join t_class_student s on c.classid=s.classid
297
         left join t_user u on u.userid=cs.teacherid
297
         left join t_user u on u.userid=cs.teacherid
298
         left join t_subject st on c.subjectid=st.subjectid
298
         left join t_subject st on c.subjectid=st.subjectid
299
-        where s.studentid=#{studentid} and c.deleted=1
300
-        <if test="timestr!=null and timestr!=''">
301
-            and cs.sectiondate=#{timestr}
299
+        where s.studentid=#{cp.studentid} and c.deleted=1
300
+        <if test="cp.subjectid!=null and cp.subjectid!='0'.toString() and cp.subjectid!=''">
301
+            and c.subjectid=#{cp.subjectid}
302
         </if>
302
         </if>
303
-        <if test="cstate!=null and cstate!=3">
304
-            and cs.sectionstate=#{cstate}
303
+        <if test="cp.timestr!=null and cp.timestr!=''">
304
+            and cs.sectiondate=#{cp.timestr}
305
         </if>
305
         </if>
306
-        <if test="cstate!=null and cstate==3">
307
-            and cs.sectionstate in(3,4)
306
+        <if test="cp.cstate!=null and cp.cstate!=-1">
307
+            and cs.sectionstate=#{cp.cstate}
308
         </if>
308
         </if>
309
-
310
         group by cs.sectionid
309
         group by cs.sectionid
311
         order by cs.sectionstate,abs(UNIX_TIMESTAMP(concat(cs.sectiondate,' ',cs.planbegintime))-UNIX_TIMESTAMP(now())),cs.sectionid
310
         order by cs.sectionstate,abs(UNIX_TIMESTAMP(concat(cs.sectiondate,' ',cs.planbegintime))-UNIX_TIMESTAMP(now())),cs.sectionid
312
     </select>
311
     </select>

+ 6
- 0
sstudy/src/main/resources/mapper/recite/ReciteStudentMapper.xml View File

18
         LEFT JOIN t_subject s ON r.subjectid = s.subjectid
18
         LEFT JOIN t_subject s ON r.subjectid = s.subjectid
19
         LEFT JOIN t_user u ON r.createid=u.userid
19
         LEFT JOIN t_user u ON r.createid=u.userid
20
         WHERE rs.studentid=#{rs.studentid} AND rg.starttime&lt;=UNIX_TIMESTAMP()
20
         WHERE rs.studentid=#{rs.studentid} AND rg.starttime&lt;=UNIX_TIMESTAMP()
21
+        <if test="rs.rsstate==1">
22
+            and rs.rsstate=0
23
+        </if>
24
+        <if test="rs.rsstate==2">
25
+            and rs.rsstate!=0
26
+        </if>
21
         <if test="rs.recitetitle!=null and rs.recitetitle!=''">
27
         <if test="rs.recitetitle!=null and rs.recitetitle!=''">
22
             and rs.recitetitle like '%${rs.recitetitle}%'
28
             and rs.recitetitle like '%${rs.recitetitle}%'
23
         </if>
29
         </if>

Loading…
Cancel
Save