Ver código fonte

更换当前时间

tags/正式版本
王宁 2 anos atrás
pai
commit
91bef29731
30 arquivos alterados com 74 adições e 53 exclusões
  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 Ver arquivo

@@ -19,7 +19,7 @@ public interface AgoralicenseMapper extends TkMapper<TAgoralicense> {
19 19
     void outLive(Integer userid);
20 20
 
21 21
     //更新失效的license的激活状态
22
-    void updateActivate();
22
+    void updateActivate(@Param("nowtime") Integer nowtime);
23 23
 
24 24
     void endLive2(@Param("license") AgoralicenseUserVo license);
25 25
 

+ 1
- 1
slive/src/main/java/com/xhkjedu/slive/mapper/liveplay/CourseSectionMapper.java Ver arquivo

@@ -71,7 +71,7 @@ public interface CourseSectionMapper extends TkMapper<LCourseSection> {
71 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 76
     //获取直播中用户id列表
77 77
     List<Integer> listUserId();

+ 2
- 1
slive/src/main/java/com/xhkjedu/slive/service/agora/AgoralicenseService.java Ver arquivo

@@ -130,7 +130,8 @@ public class AgoralicenseService {
130 130
 
131 131
     //定时任务修改license状态
132 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 Ver arquivo

@@ -221,7 +221,8 @@ public class CourseSectionService {
221 221
                     courseSectionMapper.updateSectionState(sections);//批量修改课节状态
222 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 226
                     return "执行成功";
226 227
                 }
227 228
             };

+ 1
- 1
slive/src/main/resources/mapper/agora/AgoralicenseMapper.xml Ver arquivo

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

+ 1
- 1
slive/src/main/resources/mapper/liveplay/CourseSectionMapper.xml Ver arquivo

@@ -52,7 +52,7 @@
52 52
     <!--更新课节学生在线状态为下线-->
53 53
     <update id="updateStuOnLined">
54 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 56
         where css.onlined=1 and css.sectionid in
57 57
         <foreach collection="sectionids" item="sectionid" index="index" open="(" separator="," close=")">
58 58
             ${sectionid}

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/paperstudent/PaperStudentMapper.java Ver arquivo

@@ -39,7 +39,7 @@ public interface PaperStudentMapper extends TkMapper<TPaperStudent> {
39 39
      * @Date 2020/6/10 15:54
40 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 Ver arquivo

@@ -69,7 +69,7 @@ public interface PaperStudentQuestionMapper extends TkMapper<TPaperStudentQuesti
69 69
      * @Date 2020/6/11 10:28
70 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 Ver arquivo

@@ -61,7 +61,7 @@ public interface PaperStudentScantronMapper extends TkMapper<TPaperStudentScantr
61 61
      * @param psid
62 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 Ver arquivo

@@ -44,7 +44,7 @@ public interface QuestionStudentMapper extends TkMapper<TQuestionStudent> {
44 44
      * @Date 2020/6/11 15:00
45 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 50
     //////////////////////////////////////////////学生WEB端//////////////////////////////////////////////

+ 1
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/mapper/resource/GuideGroupStudentMapper.java Ver arquivo

@@ -19,7 +19,7 @@ public interface GuideGroupStudentMapper extends TkMapper<TGuideGroupStudent> {
19 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 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 Ver arquivo

@@ -48,4 +48,7 @@ public class TRecite extends BaseBean {
48 48
     //结束时间
49 49
     @Transient
50 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 Ver arquivo

@@ -67,4 +67,7 @@ public class TReciteStudent extends BaseBean {
67 67
     @Transient
68 68
     //科目id
69 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 Ver arquivo

@@ -94,7 +94,8 @@ public class PaperStudentQuestionService {
94 94
      * @return java.lang.Integer
95 95
      **/
96 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 Ver arquivo

@@ -87,7 +87,8 @@ public class PaperStudentScantronService {
87 87
      * @return java.lang.Integer
88 88
      */
89 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 Ver arquivo

@@ -71,6 +71,8 @@ public class PaperStudentService {
71 71
 
72 72
     //获取列表
73 73
     public List<PaperStudentVo> findAll(PaperSearchVo paperSearch) {
74
+        Integer timestamp = N_Utils.getSecondTimestamp();
75
+        paperSearch.setNowtime(timestamp);
74 76
         return paperStudentMapper.findAll(paperSearch);
75 77
     }
76 78
 
@@ -157,7 +159,8 @@ public class PaperStudentService {
157 159
      * @return java.lang.Integer
158 160
      **/
159 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 166
     public int submitQuestion(TPaperStudentQuestion psq) throws Exception {

+ 6
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/service/paperstudent/PaperStudentWebService.java Ver arquivo

@@ -72,6 +72,8 @@ public class PaperStudentWebService {
72 72
 
73 73
     //获取作业列表
74 74
     public List<PaperStudentVo> listWeb(PaperSearchVo paperSearch) {
75
+        Integer timestamp = N_Utils.getSecondTimestamp();
76
+        paperSearch.setNowtime(timestamp);
75 77
         return paperStudentMapper.listWeb(paperSearch);
76 78
     }
77 79
 
@@ -104,7 +106,8 @@ public class PaperStudentWebService {
104 106
                     if(N_Utils.isListNotEmpty(stuques)) savelist.addAll(stuques);
105 107
                 }
106 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 111
                 types = paperAnalyzeMapper.listPeopleDetailAnalyze(psid);
109 112
             }
110 113
             StudyUtil.setPaperQuestion(types, paperAnalyzeMapper);
@@ -128,7 +131,8 @@ public class PaperStudentWebService {
128 131
         StudentPaperVo paper = paperAnalyzeMapper.getStudentPaperAnalyze(psid);
129 132
         List<StudentPaperTypeVo> types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
130 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 136
             paperStudentScantronService.saveBatchStudentScantron(psid);
133 137
             types = paperAnalyzeMapper.listPeopleSDetailAnalyze(psid);
134 138
         }

+ 2
- 1
sstudy/src/main/java/com/xhkjedu/sstudy/service/question/QuestionStudentService.java Ver arquivo

@@ -65,7 +65,8 @@ public class QuestionStudentService {
65 65
      * @return java.lang.Integer
66 66
      **/
67 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 Ver arquivo

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

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/recite/ReciteStudentService.java Ver arquivo

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

+ 2
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/vo/paperstudent/PaperSearchVo.java Ver arquivo

@@ -40,4 +40,6 @@ public class PaperSearchVo {
40 40
     private Integer papertype;
41 41
 
42 42
     private String papername;//作业名称
43
+
44
+    private Integer nowtime;//当前时间
43 45
 }

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudedntScantronMapper.xml Ver arquivo

@@ -44,7 +44,7 @@
44 44
     <!--自动批改学生未做试题-->
45 45
     <update id="updateScantronPSQByNotDo">
46 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 48
         WHERE pss.psid=#{psid} AND pss.answered=0
49 49
     </update>
50 50
     <!--获取该作业该学生未批改作业数量-->

+ 5
- 5
sstudy/src/main/resources/mapper/paperstudent/PaperStudentMapper.xml Ver arquivo

@@ -18,7 +18,7 @@
18 18
         left join t_director d on p.directorid=d.directorid
19 19
         left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
20 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 22
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
23 23
             and p.subjectid=#{ps.subjectid}
24 24
         </if>
@@ -61,7 +61,7 @@
61 61
     <update id="updateState">
62 62
         update t_paper_student s set
63 63
         <choose>
64
-            <when test="operate==1">s.starttime=UNIX_TIMESTAMP(NOW())</when>
64
+            <when test="operate==1">s.starttime=#{starttime}</when>
65 65
             <when test="operate==2">s.pschecked=#{pschecked},s.psstate=#{psstate}</when>
66 66
             <when test="operate==3">s.pschecked=#{pschecked}</when>
67 67
         </choose>
@@ -193,7 +193,7 @@
193 193
         left join t_subject s on p.subjectid=s.subjectid
194 194
         left join t_paper_group pg on ps.paperid = pg.paperid and ps.classid=pg.classid
195 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 197
         <if test="ps.subjectid!=null and ps.subjectid!='0'.toString() and ps.subjectid!=''">
198 198
             and p.subjectid=#{ps.subjectid}
199 199
         </if>
@@ -213,10 +213,10 @@
213 213
             and ps.pschecked!=0
214 214
         </if>
215 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 217
         </if>
218 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 220
         </if>
221 221
         GROUP BY ps.psid ORDER BY pg.starttime DESC,p.createtime DESC,ps.psid desc
222 222
     </select>

+ 1
- 1
sstudy/src/main/resources/mapper/paperstudent/PaperStudentQuestionMapper.xml Ver arquivo

@@ -51,7 +51,7 @@
51 51
     </select>
52 52
     <!--自动批改学生未做试题-->
53 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 55
         WHERE psid=#{psid} AND answered=0
56 56
     </update>
57 57
     <!--获取该作业该学生未批改作业数量-->

+ 4
- 4
sstudy/src/main/resources/mapper/question/QuestionClassMapper.xml Ver arquivo

@@ -38,8 +38,8 @@
38 38
         left join t_question_class qc on a.qcid=qc.qcid
39 39
         left join t_paper p on qc.paperid=p.paperid
40 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 43
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
44 44
             and p.subjectid=#{question.subjectid}
45 45
         </if>
@@ -87,8 +87,8 @@
87 87
             left join t_question_point qp on q.questionid = qp.questionid
88 88
         </if>
89 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 92
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
93 93
             and q.subjectid=#{question.subjectid}
94 94
         </if>

+ 5
- 5
sstudy/src/main/resources/mapper/question/QuestionStudentMapper.xml Ver arquivo

@@ -13,10 +13,10 @@
13 13
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
14 14
         where qs.studentid = #{qs.studentid} and delstate=0 and qs.subjectid=#{qs.subjectid}
15 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 17
         </if>
18 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 20
         </if>
21 21
         <if test="qs.lsbid!=null and qs.lsbid!='0'.toString() and qs.lsbid!=''">
22 22
             and p.lsbid=#{qs.lsbid}
@@ -36,7 +36,7 @@
36 36
     </update>
37 37
     <!--更新错误次数-->
38 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 40
     </update>
41 41
 
42 42
     <!--//////////////////////////////////////////////学生WEB端//////////////////////////////////////////////-->
@@ -46,10 +46,10 @@
46 46
         from t_question_student qs left join t_paper p on qs.paperid=p.paperid
47 47
         where qs.studentid=#{question.studentid} and qs.delstate=0
48 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 50
         </if>
51 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 53
         </if>
54 54
         <if test="question.subjectid!=null and question.subjectid!='0'.toString() and question.subjectid!=''">
55 55
             and qs.subjectid=#{question.subjectid}

+ 2
- 2
sstudy/src/main/resources/mapper/recite/ReciteMapper.xml Ver arquivo

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

+ 2
- 2
sstudy/src/main/resources/mapper/recite/ReciteStudentMapper.xml Ver arquivo

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

+ 2
- 2
sstudy/src/main/resources/mapper/resource/GuideGroupStudentMapper.xml Ver arquivo

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

+ 12
- 12
sstudy/src/main/resources/mapper/resource/GuideMapper.xml Ver arquivo

@@ -159,10 +159,10 @@
159 159
         left join t_class c on ggs.classid=c.classid
160 160
         where c.schoolid=#{paper.schoolid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
161 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 163
         </if>
164 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 166
         </if>
167 167
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
168 168
             and g.subjectid=#{paper.subjectid}
@@ -184,10 +184,10 @@
184 184
         left join t_guide_resource gr on g.guideid=gr.guideid
185 185
         where c.gradeid=#{paper.gradeid} and c.year=#{paper.year} and g.createid=#{paper.teacherid}
186 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 188
         </if>
189 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 191
         </if>
192 192
         <if test="paper.classid!=null and paper.classid!=0">
193 193
             and gg.classid=#{paper.classid}
@@ -210,10 +210,10 @@
210 210
         left join t_guide_group_student ggs on c.classid=ggs.classid and ggs.studentid=cs.studentid
211 211
         left join t_guide g on ggs.guideid=g.guideid
212 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 214
         </if>
215 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 217
         </if>
218 218
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
219 219
             and g.subjectid=#{paper.subjectid}
@@ -249,10 +249,10 @@
249 249
         left join t_guide_group_student ggs on ggs.studentid=cs.studentid
250 250
         left join t_guide g on ggs.guideid=g.guideid
251 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 253
         </if>
254 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 256
         </if>
257 257
         <if test="paper.subjectid!='0'.toString() and paper.subjectid!=''">
258 258
             and g.subjectid=#{paper.subjectid}
@@ -276,10 +276,10 @@
276 276
         left join t_subject s on g.subjectid=s.subjectid
277 277
         where ggs.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
278 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 280
         </if>
281 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 283
         </if>
284 284
         <if test="paper.classid!=0">
285 285
             and ggs.classid=#{paper.classid}
@@ -299,10 +299,10 @@
299 299
         left join t_guide g on ggs.guideid=g.guideid
300 300
         where ggs.studentid=#{paper.studentid} and c.gradeid=#{paper.gradeid} and c.year=#{paper.year}
301 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 303
         </if>
304 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 306
         </if>
307 307
         <if test="paper.classid!=0">
308 308
             and ggs.classid=#{paper.classid}

Carregando…
Cancelar
Salvar