Browse Source

更换当前时间

tags/正式版本
王宁 2 years ago
parent
commit
91bef29731
30 changed files with 74 additions and 53 deletions
  1. 1
    1
      slive/src/main/java/com/xhkjedu/slive/mapper/agora/AgoralicenseMapper.java
  2. 1
    1
      slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CourseSectionMapper.java
  3. 2
    1
      slive/src/main/java/com/xhkjedu/slive/service/agora/AgoralicenseService.java
  4. 2
    1
      slive/src/main/java/com/xhkjedu/slive/service/liveplay/CourseSectionService.java
  5. 1
    1
      slive/src/main/resources/mapper/agora/AgoralicenseMapper.xml
  6. 1
    1
      slive/src/main/resources/mapper/liveplay/CourseSectionMapper.xml
  7. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentMapper.java
  8. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentQuestionMapper.java
  9. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentScantronMapper.java
  10. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/question/QuestionStudentMapper.java
  11. 1
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/mapper/resource/GuideGroupStudentMapper.java
  12. 3
    0
      sstudy/src/main/java/com/xhkjedu/sstudy/model/recite/TRecite.java
  13. 3
    0
      sstudy/src/main/java/com/xhkjedu/sstudy/model/recite/TReciteStudent.java
  14. 2
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentQuestionService.java
  15. 2
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentScantronService.java
  16. 4
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java
  17. 6
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java
  18. 2
    1
      sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionStudentService.java
  19. 1
    2
      sstudy/src/main/java/com/xhkjedu/sstudy/service/recite/ReciteService.java
  20. 2
    0
      sstudy/src/main/java/com/xhkjedu/sstudy/service/recite/ReciteStudentService.java
  21. 2
    0
      sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperSearchVo.java
  22. 1
    1
      sstudy/src/main/resources/mapper/paperstudent/PaperStudedntScantronMapper.xml
  23. 5
    5
      sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml
  24. 1
    1
      sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml
  25. 4
    4
      sstudy/src/main/resources/mapper/question/QuestionClassMapper.xml
  26. 5
    5
      sstudy/src/main/resources/mapper/question/QuestionStudentMapper.xml
  27. 2
    2
      sstudy/src/main/resources/mapper/recite/ReciteMapper.xml
  28. 2
    2
      sstudy/src/main/resources/mapper/recite/ReciteStudentMapper.xml
  29. 2
    2
      sstudy/src/main/resources/mapper/resource/GuideGroupStudentMapper.xml
  30. 12
    12
      sstudy/src/main/resources/mapper/resource/GuideMapper.xml

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/mapper/agora/AgoralicenseMapper.java View File

19
     void outLive(Integer userid);
19
     void outLive(Integer userid);
20
 
20
 
21
     //更新失效的license的激活状态
21
     //更新失效的license的激活状态
22
-    void updateActivate();
22
+    void updateActivate(@Param("nowtime") Integer nowtime);
23
 
23
 
24
     void endLive2(@Param("license") AgoralicenseUserVo license);
24
     void endLive2(@Param("license") AgoralicenseUserVo license);
25
 
25
 

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

71
     void updateSectionState3();
71
     void updateSectionState3();
72
 
72
 
73
     //更新课节学生在线状态为下线
73
     //更新课节学生在线状态为下线
74
-    void updateStuOnLined(@Param("sectionids") List<Integer> sectionids);
74
+    void updateStuOnLined(@Param("sectionids") List<Integer> sectionids,@Param("nowtime") Integer nowtime);
75
 
75
 
76
     //获取直播中用户id列表
76
     //获取直播中用户id列表
77
     List<Integer> listUserId();
77
     List<Integer> listUserId();

+ 2
- 1
slive/src/main/java/com/xhkjedu/slive/service/agora/AgoralicenseService.java View File

130
 
130
 
131
     //定时任务修改license状态
131
     //定时任务修改license状态
132
     public void updateLicenseState() {
132
     public void updateLicenseState() {
133
-        agoralicenseMapper.updateActivate();//更新失效的license的激活状态
133
+        Integer nowtime = N_Utils.getSecondTimestamp();
134
+        agoralicenseMapper.updateActivate(nowtime);//更新失效的license的激活状态
134
     }
135
     }
135
 
136
 
136
     //处理未释放的授权
137
     //处理未释放的授权

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

221
                     courseSectionMapper.updateSectionState(sections);//批量修改课节状态
221
                     courseSectionMapper.updateSectionState(sections);//批量修改课节状态
222
                     if (N_Utils.isListEmpty(sectionids)) return "执行成功";
222
                     if (N_Utils.isListEmpty(sectionids)) return "执行成功";
223
                     //更新课节学生在线状态为下线
223
                     //更新课节学生在线状态为下线
224
-                    courseSectionMapper.updateStuOnLined(sectionids);
224
+                    Integer nowtime = N_Utils.getSecondTimestamp();
225
+                    courseSectionMapper.updateStuOnLined(sectionids,nowtime);
225
                     return "执行成功";
226
                     return "执行成功";
226
                 }
227
                 }
227
             };
228
             };

+ 1
- 1
slive/src/main/resources/mapper/agora/AgoralicenseMapper.xml View File

44
         update (SELECT agid,(max(activatedtime)+validityperiod*24*60*60)activatedtime
44
         update (SELECT agid,(max(activatedtime)+validityperiod*24*60*60)activatedtime
45
         FROM t_agoralicense_record GROUP BY agid)r LEFT JOIN t_agoralicense l ON r.agid=l.agid
45
         FROM t_agoralicense_record GROUP BY agid)r LEFT JOIN t_agoralicense l ON r.agid=l.agid
46
         set l.activated=2
46
         set l.activated=2
47
-        WHERE r.activatedtime<![CDATA[ < ]]>UNIX_TIMESTAMP(NOW());
47
+        WHERE r.activatedtime<![CDATA[ < ]]>#{nowtime}
48
     </update>
48
     </update>
49
     <update id="endLive2">
49
     <update id="endLive2">
50
         update t_agoralicense l set
50
         update t_agoralicense l set

+ 1
- 1
slive/src/main/resources/mapper/liveplay/CourseSectionMapper.xml View File

52
     <!--更新课节学生在线状态为下线-->
52
     <!--更新课节学生在线状态为下线-->
53
     <update id="updateStuOnLined">
53
     <update id="updateStuOnLined">
54
         update l_course_section_student css
54
         update l_course_section_student css
55
-        set css.outstamp=UNIX_TIMESTAMP(NOW()),css.onlined=2
55
+        set css.outstamp=#{nowtime},css.onlined=2
56
         where css.onlined=1 and css.sectionid in
56
         where css.onlined=1 and css.sectionid in
57
         <foreach collection="sectionids" item="sectionid" index="index" open="(" separator="," close=")">
57
         <foreach collection="sectionids" item="sectionid" index="index" open="(" separator="," close=")">
58
             ${sectionid}
58
             ${sectionid}

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentMapper.java View File

39
      * @Date 2020/6/10 15:54
39
      * @Date 2020/6/10 15:54
40
      * @return java.lang.Integer
40
      * @return java.lang.Integer
41
      **/
41
      **/
42
-    Integer updateState(@Param("psstate") Integer psstate, @Param("pschecked") Integer pschecked, @Param("psid") Integer psid, @Param("operate") Integer operate);
42
+    Integer updateState(@Param("psstate") Integer psstate, @Param("pschecked") Integer pschecked, @Param("psid") Integer psid, @Param("operate") Integer operate,@Param("starttime") Integer starttime);
43
 
43
 
44
     /**
44
     /**
45
      * 批改完修改学生总得分和批改状态 (结构性试题)
45
      * 批改完修改学生总得分和批改状态 (结构性试题)

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentQuestionMapper.java View File

69
      * @Date 2020/6/11 10:28
69
      * @Date 2020/6/11 10:28
70
      * @return java.lang.Integer
70
      * @return java.lang.Integer
71
      **/
71
      **/
72
-    Integer updatePSQByNotDo(@Param("psid") Integer psid);
72
+    Integer updatePSQByNotDo(@Param("psid") Integer psid,@Param("checktime") Integer checktime);
73
 
73
 
74
     /**
74
     /**
75
      * 获取该作业该学生未批改作业数量
75
      * 获取该作业该学生未批改作业数量

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentScantronMapper.java View File

61
      * @param psid
61
      * @param psid
62
      * @return java.lang.Integer
62
      * @return java.lang.Integer
63
      */
63
      */
64
-    Integer updateScantronPSQByNotDo(@Param("psid") Integer psid);
64
+    Integer updateScantronPSQByNotDo(@Param("psid") Integer psid,@Param("checktime") Integer checktime);
65
 
65
 
66
     /**
66
     /**
67
      *功能描述 学生作业未批改试题数量
67
      *功能描述 学生作业未批改试题数量

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/question/QuestionStudentMapper.java View File

44
      * @Date 2020/6/11 15:00
44
      * @Date 2020/6/11 15:00
45
      * @return java.lang.Integer
45
      * @return java.lang.Integer
46
      **/
46
      **/
47
-    Integer updateErrorNum(@Param("qsid") Integer qsid);
47
+    Integer updateErrorNum(@Param("qsid") Integer qsid,@Param("checktime") Integer checktime);
48
 
48
 
49
 
49
 
50
     //////////////////////////////////////////////学生WEB端//////////////////////////////////////////////
50
     //////////////////////////////////////////////学生WEB端//////////////////////////////////////////////

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/resource/GuideGroupStudentMapper.java View File

19
     Integer updateRead(@Param("student") TGuideGroupStudent student);
19
     Integer updateRead(@Param("student") TGuideGroupStudent student);
20
 
20
 
21
     //复制学生预习导学信息
21
     //复制学生预习导学信息
22
-    Integer copyGuideResource(Integer studentid, Integer classid);
22
+  /*  Integer copyGuideResource(Integer studentid, Integer classid);*/
23
 
23
 
24
     //获取学生预习记录
24
     //获取学生预习记录
25
     List<TGuideGroupStudent> listGuideGroupStudent(@Param("resourceid") String resourceid, @Param("studentid") Integer studentid);
25
     List<TGuideGroupStudent> listGuideGroupStudent(@Param("resourceid") String resourceid, @Param("studentid") Integer studentid);

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/model/recite/TRecite.java View File

48
     //结束时间
48
     //结束时间
49
     @Transient
49
     @Transient
50
     private Integer stoptime;
50
     private Integer stoptime;
51
+
52
+    @Transient
53
+    private Integer nowtime;
51
 }
54
 }

+ 3
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/model/recite/TReciteStudent.java View File

67
     @Transient
67
     @Transient
68
     //科目id
68
     //科目id
69
     private String subjectid;
69
     private String subjectid;
70
+
71
+    @Transient
72
+    private Integer nowtime;
70
 }
73
 }

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentQuestionService.java View File

94
      * @return java.lang.Integer
94
      * @return java.lang.Integer
95
      **/
95
      **/
96
     public Integer updatePSQByNotDo(Integer psid) {
96
     public Integer updatePSQByNotDo(Integer psid) {
97
-        return paperStudentQuestionMapper.updatePSQByNotDo(psid);
97
+        Integer timestamp = N_Utils.getSecondTimestamp();
98
+        return paperStudentQuestionMapper.updatePSQByNotDo(psid,timestamp);
98
     }
99
     }
99
 
100
 
100
     /**
101
     /**

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentScantronService.java View File

87
      * @return java.lang.Integer
87
      * @return java.lang.Integer
88
      */
88
      */
89
     public Integer updateScantronPSQByNotDo(Integer psid){
89
     public Integer updateScantronPSQByNotDo(Integer psid){
90
-        return paperStudentScantronMapper.updateScantronPSQByNotDo(psid);
90
+        Integer timestamp = N_Utils.getSecondTimestamp();
91
+        return paperStudentScantronMapper.updateScantronPSQByNotDo(psid,timestamp);
91
     }
92
     }
92
 
93
 
93
     /**
94
     /**

+ 4
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentService.java View File

71
 
71
 
72
     //获取列表
72
     //获取列表
73
     public List<PaperStudentVo> findAll(PaperSearchVo paperSearch) {
73
     public List<PaperStudentVo> findAll(PaperSearchVo paperSearch) {
74
+        Integer timestamp = N_Utils.getSecondTimestamp();
75
+        paperSearch.setNowtime(timestamp);
74
         return paperStudentMapper.findAll(paperSearch);
76
         return paperStudentMapper.findAll(paperSearch);
75
     }
77
     }
76
 
78
 
157
      * @return java.lang.Integer
159
      * @return java.lang.Integer
158
      **/
160
      **/
159
     public Integer updateState(Integer psstate, Integer pschecked, Integer psid, Integer operate){
161
     public Integer updateState(Integer psstate, Integer pschecked, Integer psid, Integer operate){
160
-        return paperStudentMapper.updateState(psstate, pschecked, psid, operate);
162
+        Integer timestamp = N_Utils.getSecondTimestamp();
163
+        return paperStudentMapper.updateState(psstate, pschecked, psid, operate,timestamp);
161
     }
164
     }
162
 
165
 
163
     public int submitQuestion(TPaperStudentQuestion psq) throws Exception {
166
     public int submitQuestion(TPaperStudentQuestion psq) throws Exception {

+ 6
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java View File

72
 
72
 
73
     //获取作业列表
73
     //获取作业列表
74
     public List<PaperStudentVo> listWeb(PaperSearchVo paperSearch) {
74
     public List<PaperStudentVo> listWeb(PaperSearchVo paperSearch) {
75
+        Integer timestamp = N_Utils.getSecondTimestamp();
76
+        paperSearch.setNowtime(timestamp);
75
         return paperStudentMapper.listWeb(paperSearch);
77
         return paperStudentMapper.listWeb(paperSearch);
76
     }
78
     }
77
 
79
 
104
                     if(N_Utils.isListNotEmpty(stuques)) savelist.addAll(stuques);
106
                     if(N_Utils.isListNotEmpty(stuques)) savelist.addAll(stuques);
105
                 }
107
                 }
106
                 if(N_Utils.isListNotEmpty(savelist)) paperStudentQuestionMapper.batchSave(savelist);
108
                 if(N_Utils.isListNotEmpty(savelist)) paperStudentQuestionMapper.batchSave(savelist);
107
-                paperStudentMapper.updateState(null,null,psid,1);//更改开始状态
109
+                Integer timestamp = N_Utils.getSecondTimestamp();
110
+                paperStudentMapper.updateState(null,null,psid,1,timestamp);//更改开始状态
108
                 types = paperAnalyzeMapper.listPeopleDetailAnalyze(psid);
111
                 types = paperAnalyzeMapper.listPeopleDetailAnalyze(psid);
109
             }
112
             }
110
             StudyUtil.setPaperQuestion(types, paperAnalyzeMapper);
113
             StudyUtil.setPaperQuestion(types, paperAnalyzeMapper);
128
         StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
131
         StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
129
         List<StudentPaperTypeVo> types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
132
         List<StudentPaperTypeVo> types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
130
         if (N_Utils.isListEmpty(types)){
133
         if (N_Utils.isListEmpty(types)){
131
-            paperStudentMapper.updateState(null,null,psid,1);//更改开始状态
134
+            Integer timestamp = N_Utils.getSecondTimestamp();
135
+            paperStudentMapper.updateState(null,null,psid,1,timestamp);//更改开始状态
132
             paperStudentScantronService.saveBatchStudentScantron(psid);
136
             paperStudentScantronService.saveBatchStudentScantron(psid);
133
             types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
137
             types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
134
         }
138
         }

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionStudentService.java View File

65
      * @return java.lang.Integer
65
      * @return java.lang.Integer
66
      **/
66
      **/
67
     public Integer updateErrorNum(Integer qsid) {
67
     public Integer updateErrorNum(Integer qsid) {
68
-        return questionStudentMapper.updateErrorNum(qsid);
68
+        Integer nowtime = N_Utils.getSecondTimestamp();
69
+        return questionStudentMapper.updateErrorNum(qsid,nowtime);
69
     }
70
     }
70
 
71
 
71
     //获取详情
72
     //获取详情

+ 1
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/recite/ReciteService.java View File

7
 import com.xhkjedu.sstudy.model.recite.TRecite;
7
 import com.xhkjedu.sstudy.model.recite.TRecite;
8
 import com.xhkjedu.sstudy.model.recite.TReciteGroup;
8
 import com.xhkjedu.sstudy.model.recite.TReciteGroup;
9
 import com.xhkjedu.sstudy.model.recite.TReciteStudent;
9
 import com.xhkjedu.sstudy.model.recite.TReciteStudent;
10
-import com.xhkjedu.sstudy.vo.recite.ReciteClassVo;
11
-import com.xhkjedu.sstudy.vo.recite.ReciteVo;
12
 import com.xhkjedu.utils.N_Utils;
10
 import com.xhkjedu.utils.N_Utils;
13
 import com.xhkjedu.vo.ResultVo;
11
 import com.xhkjedu.vo.ResultVo;
14
 import lombok.extern.slf4j.Slf4j;
12
 import lombok.extern.slf4j.Slf4j;
138
      * @date 2020/6/10
136
      * @date 2020/6/10
139
      */
137
      */
140
     public List<Map> listRecites(TRecite recite) {
138
     public List<Map> listRecites(TRecite recite) {
139
+        recite.setNowtime(N_Utils.getSecondTimestamp());
141
         List<Map> list = reciteMapper.listRecites(recite);
140
         List<Map> list = reciteMapper.listRecites(recite);
142
         return list;
141
         return list;
143
     }
142
     }

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/recite/ReciteStudentService.java View File

37
      * @return java.util.List<com.xhkjedu.vo.recite.ReciteStudentVo>
37
      * @return java.util.List<com.xhkjedu.vo.recite.ReciteStudentVo>
38
      */
38
      */
39
     public List<ReciteStudentVo> listStuReceites(TReciteStudent rs){
39
     public List<ReciteStudentVo> listStuReceites(TReciteStudent rs){
40
+        rs.setNowtime(N_Utils.getSecondTimestamp());
40
         return reciteStudentMapper.listStuReceites(rs);
41
         return reciteStudentMapper.listStuReceites(rs);
41
     }
42
     }
42
 
43
 
114
      * @Date 2020/9/4 9:08
115
      * @Date 2020/9/4 9:08
115
      **/
116
      **/
116
     public List<ReciteStudentVo> listReciteStuWeb(TReciteStudent student) {
117
     public List<ReciteStudentVo> listReciteStuWeb(TReciteStudent student) {
118
+        student.setNowtime(N_Utils.getSecondTimestamp());
117
         return reciteStudentMapper.listReciteForStuWeb(student);
119
         return reciteStudentMapper.listReciteForStuWeb(student);
118
     }
120
     }
119
 }
121
 }

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperSearchVo.java View File

40
     private Integer papertype;
40
     private Integer papertype;
41
 
41
 
42
     private String papername;//作业名称
42
     private String papername;//作业名称
43
+
44
+    private Integer nowtime;//当前时间
43
 }
45
 }

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudedntScantronMapper.xml View File

44
     <!--自动批改学生未做试题-->
44
     <!--自动批改学生未做试题-->
45
     <update id="updateScantronPSQByNotDo">
45
     <update id="updateScantronPSQByNotDo">
46
         UPDATE t_paper_student_scantron pss
46
         UPDATE t_paper_student_scantron pss
47
-        SET pss.costtime=0,pss.checked=1,pss.stuscore=0,pss.checkid=0,pss.checktime=UNIX_TIMESTAMP(NOW())
47
+        SET pss.costtime=0,pss.checked=1,pss.stuscore=0,pss.checkid=0,pss.checktime=#{checktime}
48
         WHERE pss.psid=#{psid} AND pss.answered=0
48
         WHERE pss.psid=#{psid} AND pss.answered=0
49
     </update>
49
     </update>
50
     <!--获取该作业该学生未批改作业数量-->
50
     <!--获取该作业该学生未批改作业数量-->

+ 5
- 5
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml View File

18
         left join t_director d on p.directorid=d.directorid
18
         left join t_director d on p.directorid=d.directorid
19
         left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
19
         left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
20
         left join t_user u on p.createid = u.userid
20
         left join t_user u on p.createid = u.userid
21
-        where ps.studentid = #{ps.studentid} and pg.starttime&lt;=UNIX_TIMESTAMP()
21
+        where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
23
             and p.subjectid=#{ps.subjectid}
23
             and p.subjectid=#{ps.subjectid}
24
         </if>
24
         </if>
61
     <update id="updateState">
61
     <update id="updateState">
62
         update t_paper_student s set
62
         update t_paper_student s set
63
         <choose>
63
         <choose>
64
-            <when test="operate==1">s.starttime=UNIX_TIMESTAMP(NOW())</when>
64
+            <when test="operate==1">s.starttime=#{starttime}</when>
65
             <when test="operate==2">s.pschecked=#{pschecked},s.psstate=#{psstate}</when>
65
             <when test="operate==2">s.pschecked=#{pschecked},s.psstate=#{psstate}</when>
66
             <when test="operate==3">s.pschecked=#{pschecked}</when>
66
             <when test="operate==3">s.pschecked=#{pschecked}</when>
67
         </choose>
67
         </choose>
193
         left join t_subject s on p.subjectid=s.subjectid
193
         left join t_subject s on p.subjectid=s.subjectid
194
         left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
194
         left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
195
         left join t_user u on p.createid = u.userid
195
         left join t_user u on p.createid = u.userid
196
-        where ps.studentid = #{ps.studentid} and pg.starttime&lt;=UNIX_TIMESTAMP()
196
+        where ps.studentid = #{ps.studentid} and pg.starttime&lt;=#{ps.nowtime}
197
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
197
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
198
             and p.subjectid=#{ps.subjectid}
198
             and p.subjectid=#{ps.subjectid}
199
         </if>
199
         </if>
213
             and ps.pschecked!=0
213
             and ps.pschecked!=0
214
         </if>
214
         </if>
215
         <if test="ps.starttime!=null and ps.starttime!=0">
215
         <if test="ps.starttime!=null and ps.starttime!=0">
216
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(pg.starttime,'%Y%m%d'))>=#{ps.starttime}
216
+            and pg.starttime>=#{ps.starttime}
217
         </if>
217
         </if>
218
         <if test="ps.stoptime!=null and ps.stoptime!=0">
218
         <if test="ps.stoptime!=null and ps.stoptime!=0">
219
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(pg.starttime,'%Y%m%d'))&lt;=#{ps.stoptime}
219
+            and pg.starttime &lt;= #{ps.stoptime}
220
         </if>
220
         </if>
221
         GROUP BY ps.psid ORDER BY pg.starttime DESC,p.createtime DESC,ps.psid desc
221
         GROUP BY ps.psid ORDER BY pg.starttime DESC,p.createtime DESC,ps.psid desc
222
     </select>
222
     </select>

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml View File

51
     </select>
51
     </select>
52
     <!--自动批改学生未做试题-->
52
     <!--自动批改学生未做试题-->
53
     <update id="updatePSQByNotDo">
53
     <update id="updatePSQByNotDo">
54
-        UPDATE t_paper_student_question SET costtime=0,checked=1,stuscore=0,checkid=0,checktime=UNIX_TIMESTAMP(NOW())
54
+        UPDATE t_paper_student_question SET costtime=0,checked=1,stuscore=0,checkid=0,checktime=#{checktime}
55
         WHERE psid=#{psid} AND answered=0
55
         WHERE psid=#{psid} AND answered=0
56
     </update>
56
     </update>
57
     <!--获取该作业该学生未批改作业数量-->
57
     <!--获取该作业该学生未批改作业数量-->

+ 4
- 4
sstudy/src/main/resources/mapper/question/QuestionClassMapper.xml View File

38
         left join t_question_class qc on a.qcid=qc.qcid
38
         left join t_question_class qc on a.qcid=qc.qcid
39
         left join t_paper p on qc.paperid=p.paperid
39
         left join t_paper p on qc.paperid=p.paperid
40
         where qc.classid=#{question.classid} and qc.qctype in(1,2)
40
         where qc.classid=#{question.classid} and qc.qctype in(1,2)
41
-        and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))>=#{question.starttime}
42
-        and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))&lt;=#{question.stoptime}
41
+        and qc.createtime>=#{question.starttime}
42
+        and qc.createtime&lt;=#{question.stoptime}
43
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
43
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
44
             and p.subjectid=#{question.subjectid}
44
             and p.subjectid=#{question.subjectid}
45
         </if>
45
         </if>
87
             left join t_question_point qp on q.questionid = qp.questionid
87
             left join t_question_point qp on q.questionid = qp.questionid
88
         </if>
88
         </if>
89
         where qc.qctype!=2 and qc.classid=#{question.classid}
89
         where qc.qctype!=2 and qc.classid=#{question.classid}
90
-        and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))>=#{question.starttime}
91
-        and UNIX_TIMESTAMP(FROM_UNIXTIME(qc.createtime,'%Y%m%d'))&lt;=#{question.stoptime}
90
+        and qc.createtime>=#{question.starttime}
91
+        and qc.createtime&lt;=#{question.stoptime}
92
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
92
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
93
             and q.subjectid=#{question.subjectid}
93
             and q.subjectid=#{question.subjectid}
94
         </if>
94
         </if>

+ 5
- 5
sstudy/src/main/resources/mapper/question/QuestionStudentMapper.xml View File

13
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
13
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
14
         where qs.studentid = #{qs.studentid} and delstate=0 and qs.subjectid=#{qs.subjectid}
14
         where qs.studentid = #{qs.studentid} and delstate=0 and qs.subjectid=#{qs.subjectid}
15
         <if test="qs.starttime!=null and qs.starttime!=0">
15
         <if test="qs.starttime!=null and qs.starttime!=0">
16
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(qs.handletime,'%Y%m%d'))>=#{qs.starttime}
16
+            and qs.handletime>=#{qs.starttime}
17
         </if>
17
         </if>
18
         <if test="qs.stoptime!=null and qs.stoptime!=0">
18
         <if test="qs.stoptime!=null and qs.stoptime!=0">
19
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(qs.handletime,'%Y%m%d'))&lt;=#{qs.stoptime}
19
+            and qs.handletime&lt;=#{qs.stoptime}
20
         </if>
20
         </if>
21
         <if test="qs.lsbid!=null and qs.lsbid!='0'.toString() and qs.lsbid!=''">
21
         <if test="qs.lsbid!=null and qs.lsbid!='0'.toString() and qs.lsbid!=''">
22
             and p.lsbid=#{qs.lsbid}
22
             and p.lsbid=#{qs.lsbid}
36
     </update>
36
     </update>
37
     <!--更新错误次数-->
37
     <!--更新错误次数-->
38
     <update id="updateErrorNum">
38
     <update id="updateErrorNum">
39
-        update t_question_student set errornum=errornum+1,delstate=0,handletime=UNIX_TIMESTAMP(NOW()) where qsid=#{qsid}
39
+        update t_question_student set errornum=errornum+1,delstate=0,handletime=#{checktime} where qsid=#{qsid}
40
     </update>
40
     </update>
41
 
41
 
42
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
42
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
46
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
46
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
47
         where qs.studentid=#{question.studentid} and qs.delstate=0
47
         where qs.studentid=#{question.studentid} and qs.delstate=0
48
         <if test="question.starttime!=null and question.starttime!=0">
48
         <if test="question.starttime!=null and question.starttime!=0">
49
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(qs.handletime,'%Y%m%d'))>=#{question.starttime}
49
+            and qs.handletime>=#{question.starttime}
50
         </if>
50
         </if>
51
         <if test="question.stoptime!=null and question.stoptime!=0">
51
         <if test="question.stoptime!=null and question.stoptime!=0">
52
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(qs.handletime,'%Y%m%d'))&lt;=#{question.stoptime}
52
+            and qs.handletime&lt;=#{question.stoptime}
53
         </if>
53
         </if>
54
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
54
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
55
             and qs.subjectid=#{question.subjectid}
55
             and qs.subjectid=#{question.subjectid}

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

26
         LEFT JOIN t_recite_student rs ON rg.reciteid=rs.reciteid and rs.classid=rg.classid
26
         LEFT JOIN t_recite_student rs ON rg.reciteid=rs.reciteid and rs.classid=rg.classid
27
         where r.createid=#{recite.createid}
27
         where r.createid=#{recite.createid}
28
         <if test="recite.recitestate==1">
28
         <if test="recite.recitestate==1">
29
-            AND rg.stoptime<![CDATA[ >= ]]>UNIX_TIMESTAMP()
29
+            AND rg.stoptime<![CDATA[ >= ]]>#{recite.nowtime}
30
         </if>
30
         </if>
31
         <if test="recite.recitestate==2">
31
         <if test="recite.recitestate==2">
32
-            AND rg.stoptime<![CDATA[ < ]]>UNIX_TIMESTAMP()
32
+            AND rg.stoptime<![CDATA[ < ]]>#{recite.nowtime}
33
         </if>
33
         </if>
34
         <if test="recite.recitetitle!=null and recite.recitetitle!=''">
34
         <if test="recite.recitetitle!=null and recite.recitetitle!=''">
35
             AND r.recitetitle like '%${recite.recitetitle}%'
35
             AND r.recitetitle like '%${recite.recitetitle}%'

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

17
         LEFT JOIN t_recite_group rg ON rs.reciteid=rg.reciteid AND rg.classid=rs.classid
17
         LEFT JOIN t_recite_group rg ON rs.reciteid=rg.reciteid AND rg.classid=rs.classid
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;=#{rs.nowtime}
21
         <if test="rs.rsstate==1">
21
         <if test="rs.rsstate==1">
22
             and rs.rsstate=0
22
             and rs.rsstate=0
23
         </if>
23
         </if>
67
         LEFT JOIN t_recite_group rg ON rs.reciteid=rg.reciteid AND rg.classid=rs.classid
67
         LEFT JOIN t_recite_group rg ON rs.reciteid=rg.reciteid AND rg.classid=rs.classid
68
         LEFT JOIN t_subject s ON r.subjectid = s.subjectid
68
         LEFT JOIN t_subject s ON r.subjectid = s.subjectid
69
         LEFT JOIN t_user u ON r.createid=u.userid
69
         LEFT JOIN t_user u ON r.createid=u.userid
70
-        WHERE rs.studentid=#{rs.studentid} AND rg.starttime&lt;=UNIX_TIMESTAMP()
70
+        WHERE rs.studentid=#{rs.studentid} AND rg.starttime&lt;=#{rs.nowtime}
71
         <if test="rs.rsstate==1">
71
         <if test="rs.rsstate==1">
72
             and rs.rsstate=0
72
             and rs.rsstate=0
73
         </if>
73
         </if>

+ 2
- 2
sstudy/src/main/resources/mapper/resource/GuideGroupStudentMapper.xml View File

30
         where guideid=#{student.guideid} and studentid=#{student.studentid}
30
         where guideid=#{student.guideid} and studentid=#{student.studentid}
31
     </update>
31
     </update>
32
     <!--复制学生预习导学信息-->
32
     <!--复制学生预习导学信息-->
33
-    <insert id="copyGuideResource">
33
+  <!--  <insert id="copyGuideResource">
34
         insert into t_guide_group_student(guideid,classid,studentid,createtime)
34
         insert into t_guide_group_student(guideid,classid,studentid,createtime)
35
         select gg.guideid,gg.classid,#{studentid},UNIX_TIMESTAMP(now())
35
         select gg.guideid,gg.classid,#{studentid},UNIX_TIMESTAMP(now())
36
         from t_guide_group gg left join t_guide_group_student ggs on gg.guideid=ggs.guideid
36
         from t_guide_group gg left join t_guide_group_student ggs on gg.guideid=ggs.guideid
37
         and gg.classid=ggs.classid and ggs.studentid=#{studentid}
37
         and gg.classid=ggs.classid and ggs.studentid=#{studentid}
38
         where gg.classid=#{classid} and ggs.rgsid is null
38
         where gg.classid=#{classid} and ggs.rgsid is null
39
-    </insert>
39
+    </insert>-->
40
 
40
 
41
     <!--获取学生预习记录-->
41
     <!--获取学生预习记录-->
42
     <select id="listGuideGroupStudent" resultType="com.xhkjedu.sstudy.model.resource.TGuideGroupStudent">
42
     <select id="listGuideGroupStudent" resultType="com.xhkjedu.sstudy.model.resource.TGuideGroupStudent">

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

159
         left join t_class c on ggs.classid=c.classid
159
         left join t_class c on ggs.classid=c.classid
160
         where c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
160
         where c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
161
         <if test="paper.starttime!=null and paper.starttime!=0">
161
         <if test="paper.starttime!=null and paper.starttime!=0">
162
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))>=#{paper.starttime}
162
+            and g.createtime>=#{paper.starttime}
163
         </if>
163
         </if>
164
         <if test="paper.stoptime!=null and paper.stoptime!=0">
164
         <if test="paper.stoptime!=null and paper.stoptime!=0">
165
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))&lt;=#{paper.stoptime}
165
+            and g.createtime&lt;=#{paper.stoptime}
166
         </if>
166
         </if>
167
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
167
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
168
             and g.subjectid=#{paper.subjectid}
168
             and g.subjectid=#{paper.subjectid}
184
         left join t_guide_resource gr on g.guideid=gr.guideid
184
         left join t_guide_resource gr on g.guideid=gr.guideid
185
         where c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and g.createid=#{paper.teacherid}
185
         where c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and g.createid=#{paper.teacherid}
186
         <if test="paper.starttime!=null and paper.starttime!=0">
186
         <if test="paper.starttime!=null and paper.starttime!=0">
187
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))>=#{paper.starttime}
187
+            and g.createtime>=#{paper.starttime}
188
         </if>
188
         </if>
189
         <if test="paper.stoptime!=null and paper.stoptime!=0">
189
         <if test="paper.stoptime!=null and paper.stoptime!=0">
190
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))&lt;=#{paper.stoptime}
190
+            and g.createtime&lt;=#{paper.stoptime}
191
         </if>
191
         </if>
192
         <if test="paper.classid!=null and paper.classid!=0">
192
         <if test="paper.classid!=null and paper.classid!=0">
193
             and gg.classid=#{paper.classid}
193
             and gg.classid=#{paper.classid}
210
         left join t_guide_group_student ggs on c.classid=ggs.classid and ggs.studentid=cs.studentid
210
         left join t_guide_group_student ggs on c.classid=ggs.classid and ggs.studentid=cs.studentid
211
         left join t_guide g on ggs.guideid=g.guideid
211
         left join t_guide g on ggs.guideid=g.guideid
212
         <if test="paper.starttime!=null and paper.starttime!=0">
212
         <if test="paper.starttime!=null and paper.starttime!=0">
213
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))>=#{paper.starttime}
213
+            and g.createtime>=#{paper.starttime}
214
         </if>
214
         </if>
215
         <if test="paper.stoptime!=null and paper.stoptime!=0">
215
         <if test="paper.stoptime!=null and paper.stoptime!=0">
216
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))&lt;=#{paper.stoptime}
216
+            and g.createtime&lt;=#{paper.stoptime}
217
         </if>
217
         </if>
218
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
218
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
219
             and g.subjectid=#{paper.subjectid}
219
             and g.subjectid=#{paper.subjectid}
249
         left join t_guide_group_student ggs on ggs.studentid=cs.studentid
249
         left join t_guide_group_student ggs on ggs.studentid=cs.studentid
250
         left join t_guide g on ggs.guideid=g.guideid
250
         left join t_guide g on ggs.guideid=g.guideid
251
         <if test="paper.starttime!=null and paper.starttime!=0">
251
         <if test="paper.starttime!=null and paper.starttime!=0">
252
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))>=#{paper.starttime}
252
+            and g.createtime>=#{paper.starttime}
253
         </if>
253
         </if>
254
         <if test="paper.stoptime!=null and paper.stoptime!=0">
254
         <if test="paper.stoptime!=null and paper.stoptime!=0">
255
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))&lt;=#{paper.stoptime}
255
+            and g.createtime&lt;=#{paper.stoptime}
256
         </if>
256
         </if>
257
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
257
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
258
             and g.subjectid=#{paper.subjectid}
258
             and g.subjectid=#{paper.subjectid}
276
         left join t_subject s on g.subjectid=s.subjectid
276
         left join t_subject s on g.subjectid=s.subjectid
277
         where ggs.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
277
         where ggs.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
278
         <if test="paper.starttime!=null and paper.starttime!=0">
278
         <if test="paper.starttime!=null and paper.starttime!=0">
279
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))>=#{paper.starttime}
279
+            and g.createtime>=#{paper.starttime}
280
         </if>
280
         </if>
281
         <if test="paper.stoptime!=null and paper.stoptime!=0">
281
         <if test="paper.stoptime!=null and paper.stoptime!=0">
282
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))&lt;=#{paper.stoptime}
282
+            and g.createtime&lt;=#{paper.stoptime}
283
         </if>
283
         </if>
284
         <if test="paper.classid!=0">
284
         <if test="paper.classid!=0">
285
             and ggs.classid=#{paper.classid}
285
             and ggs.classid=#{paper.classid}
299
         left join t_guide g on ggs.guideid=g.guideid
299
         left join t_guide g on ggs.guideid=g.guideid
300
         where ggs.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
300
         where ggs.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
301
         <if test="paper.starttime!=null and paper.starttime!=0">
301
         <if test="paper.starttime!=null and paper.starttime!=0">
302
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))>=#{paper.starttime}
302
+            and g.createtime>=#{paper.starttime}
303
         </if>
303
         </if>
304
         <if test="paper.stoptime!=null and paper.stoptime!=0">
304
         <if test="paper.stoptime!=null and paper.stoptime!=0">
305
-            and UNIX_TIMESTAMP(FROM_UNIXTIME(g.createtime,'%Y%m%d'))&lt;=#{paper.stoptime}
305
+            and g.createtim&lt;=#{paper.stoptime}
306
         </if>
306
         </if>
307
         <if test="paper.classid!=0">
307
         <if test="paper.classid!=0">
308
             and ggs.classid=#{paper.classid}
308
             and ggs.classid=#{paper.classid}

Loading…
Cancel
Save