Browse Source

背诵、预习列表完善

tags/正式3.9.0
雍文秀 1 year ago
parent
commit
b25600617c

+ 6
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/controller/resource/GuideController.java View File

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

+ 2
- 2
sstudy/src/main/resources/mapper/recite/ReciteMapper.xml View File

51
         left join t_class_teacher ct on rg.classid=ct.classid
51
         left join t_class_teacher ct on rg.classid=ct.classid
52
         left join t_teacher_subjectbook ts on ct.teacherid=ts.teacherid
52
         left join t_teacher_subjectbook ts on ct.teacherid=ts.teacherid
53
         where ct.teacherid=#{recite.createid} and r.subjectid=ts.subjectid
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
         <if test="recite.recitestate==1">
56
         <if test="recite.recitestate==1">
57
             AND rg.stoptime<![CDATA[ >= ]]>#{recite.nowtime}
57
             AND rg.stoptime<![CDATA[ >= ]]>#{recite.nowtime}
58
         </if>
58
         </if>

+ 4
- 4
sstudy/src/main/resources/mapper/resource/GuideMapper.xml View File

21
         from t_guide g left join t_guide_resource gr on g.guideid=gr.guideid
21
         from t_guide g left join t_guide_resource gr on g.guideid=gr.guideid
22
         left join t_guide_group gg on g.guideid = gg.guideid
22
         left join t_guide_group gg on g.guideid = gg.guideid
23
         where g.subjectid=#{guide.subjectid}
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
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
26
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
27
             and g.lsbid = #{guide.lsbid}
27
             and g.lsbid = #{guide.lsbid}
28
         </if>
28
         </if>
50
         left join t_resource r on gr.resourceid=r.resourceid
50
         left join t_resource r on gr.resourceid=r.resourceid
51
         left join t_guide_group gg on g.guideid = gg.guideid
51
         left join t_guide_group gg on g.guideid = gg.guideid
52
         where g.subjectid=#{guide.subjectid}
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
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
55
         <if test="guide.lsbid!=null and guide.lsbid!='' and guide.lsbid!='0'.toString()">
56
             and g.lsbid = #{guide.lsbid}
56
             and g.lsbid = #{guide.lsbid}
57
         </if>
57
         </if>

Loading…
Cancel
Save