Pārlūkot izejas kodu

直播状态、背诵状态搜索

tags/正式3.2.5
王宁 pirms 2 gadiem
vecāks
revīzija
b785aa228f

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CourseMapper.java Parādīt failu

@@ -58,7 +58,7 @@ public interface CourseMapper extends TkMapper<LCourse> {
58 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 64
     List<SectionDateVo> listSectionDateForTeacher(@Param("course") CourseParams course);

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/service/liveplay/CourseService.java Parādīt failu

@@ -538,7 +538,7 @@ public class CourseService {
538 538
 
539 539
     //指定日期的课节列表
540 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 544
     public List<SectionDateVo> listSectionDateForTeacher(CourseParams p) {

+ 7
- 8
slive/src/main/resources/mapper/liveplay/CourseMapper.xml Parādīt failu

@@ -296,17 +296,16 @@
296 296
         left join t_class_student s on c.classid=s.classid
297 297
         left join t_user u on u.userid=cs.teacherid
298 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 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 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 308
         </if>
309
-
310 309
         group by cs.sectionid
311 310
         order by cs.sectionstate,abs(UNIX_TIMESTAMP(concat(cs.sectiondate,' ',cs.planbegintime))-UNIX_TIMESTAMP(now())),cs.sectionid
312 311
     </select>

+ 6
- 0
sstudy/src/main/resources/mapper/recite/ReciteStudentMapper.xml Parādīt failu

@@ -18,6 +18,12 @@
18 18
         LEFT JOIN t_subject s ON r.subjectid = s.subjectid
19 19
         LEFT JOIN t_user u ON r.createid=u.userid
20 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 27
         <if test="rs.recitetitle!=null and rs.recitetitle!=''">
22 28
             and rs.recitetitle like '%${rs.recitetitle}%'
23 29
         </if>

Notiek ielāde…
Atcelt
Saglabāt