Procházet zdrojové kódy

背诵、预习列表完善

tags/正式3.9.0
雍文秀 před 1 rokem
rodič
revize
b25600617c

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/controller/resource/GuideController.java Zobrazit soubor

@@ -50,6 +50,9 @@ public class GuideController {
50 50
         Map<String, String> map = classService.getQxClassidsByTeacherid(createid);
51 51
         guide.setClassids(map.get("classids"));
52 52
         guide.setBxclassids(map.get("bxclassids"));
53
+        if (N_Utils.isEmpty(guide.getSchoolid())) {
54
+            guide.setSchoolid(N_Utils.str2Int(map.get("userschoolid")));
55
+        }
53 56
         PageHelper.startPage(page, pageSize);
54 57
         List<GuideVo> list = guideService.listGuidesForTeacherWeb(guide);
55 58
         PageResult pageResult = PageUtil.getPageResult(new PageInfo<>(list));
@@ -67,6 +70,9 @@ public class GuideController {
67 70
         Map<String, String> map = classService.getQxClassidsByTeacherid(createid);
68 71
         guide.setClassids(map.get("classids"));
69 72
         guide.setBxclassids(map.get("bxclassids"));
73
+        if (N_Utils.isEmpty(guide.getSchoolid())) {
74
+            guide.setSchoolid(N_Utils.str2Int(map.get("userschoolid")));
75
+        }
70 76
         guide.setPage((page - 1)*pageSize);
71 77
         List<Map> list = guideService.listGuidesForTeacherApp(guide);
72 78
         return new ResultVo(0,"获取教师预习列表成功",list);

+ 2
- 2
sstudy/src/main/resources/mapper/recite/ReciteMapper.xml Zobrazit soubor

@@ -51,8 +51,8 @@
51 51
         left join t_class_teacher ct on rg.classid=ct.classid
52 52
         left join t_teacher_subjectbook ts on ct.teacherid=ts.teacherid
53 53
         where ct.teacherid=#{recite.createid} and r.subjectid=ts.subjectid
54
-        and ((r.hashb=1 and rg.classid in (${recite.classids})) or
55
-        (r.hashb=0 and rg.classid in (${recite.bxclassids})))
54
+        and ((r.hashb=1 and r.schoolid=#{recite.schoolid} and rg.classid in (${recite.classids})) or
55
+        (rg.classid in (${recite.bxclassids})))
56 56
         <if test="recite.recitestate==1">
57 57
             AND rg.stoptime<![CDATA[ >= ]]>#{recite.nowtime}
58 58
         </if>

+ 4
- 4
sstudy/src/main/resources/mapper/resource/GuideMapper.xml Zobrazit soubor

@@ -21,8 +21,8 @@
21 21
         from t_guide g left join t_guide_resource gr on g.guideid=gr.guideid
22 22
         left join t_guide_group gg on g.guideid = gg.guideid
23 23
         where g.subjectid=#{guide.subjectid}
24
-        and ((g.hashb=1 and gg.classid in (${guide.classids})) or
25
-        (g.hashb=0 and gg.classid in (${guide.bxclassids})))
24
+        and ((g.hashb=1 and g.schoolid=#{guide.schoolid} and gg.classid in (${guide.classids})) or
25
+        (gg.classid in (${guide.bxclassids})))
26 26
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
27 27
             and g.lsbid = #{guide.lsbid}
28 28
         </if>
@@ -50,8 +50,8 @@
50 50
         left join t_resource r on gr.resourceid=r.resourceid
51 51
         left join t_guide_group gg on g.guideid = gg.guideid
52 52
         where g.subjectid=#{guide.subjectid}
53
-        and ((g.hashb=1 and gg.classid in (${guide.classids})) or
54
-        (g.hashb=0 and gg.classid in (${guide.bxclassids})))
53
+        and ((g.hashb=1 and g.schoolid=#{guide.schoolid} and gg.classid in (${guide.classids})) or
54
+        (gg.classid in (${guide.bxclassids})))
55 55
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
56 56
             and g.lsbid = #{guide.lsbid}
57 57
         </if>

Načítá se…
Zrušit
Uložit