|
|
@@ -594,6 +594,7 @@
|
|
|
)t1
|
|
|
JOIN (
|
|
|
select cr1.* from COURSE_RELATE cr1
|
|
|
+ WHERE cr1.DELETE_FLAG ='NOT_DELETE'
|
|
|
<if test="startTime!=null and startTime != ''">
|
|
|
and cr1.CREATE_TIME >=#{startTime}
|
|
|
</if>
|
|
|
@@ -1015,7 +1016,8 @@
|
|
|
GROUP BY stu.ID,cch.ID,cc.ID,ci.COURSE_ID
|
|
|
)t1
|
|
|
JOIN (
|
|
|
- select cr1.* COURSE_RELATE cr1
|
|
|
+ select cr1.* from COURSE_RELATE cr1
|
|
|
+ where cr1.DELETE_FLAG ='NOT_DELETE'
|
|
|
<if test="startTime!=null and startTime != ''">
|
|
|
and cr1.CREATE_TIME >=#{startTime}
|
|
|
</if>
|
|
|
@@ -1312,7 +1314,17 @@
|
|
|
</if>
|
|
|
GROUP BY stu.ID,cch.ID,cc.ID,ci.COURSE_ID
|
|
|
)t1
|
|
|
- LEFT JOIN (SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID,csb1.STAY_TIME FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID,csb1.STAY_TIME
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
GROUP BY t1.hourId
|
|
|
)z1
|
|
|
@@ -1386,7 +1398,18 @@
|
|
|
</if>
|
|
|
GROUP BY stu.ID,cch.ID,cc.ID,ci.COURSE_ID
|
|
|
)t1
|
|
|
- JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1' GROUP BY csb1.USER_ID,csb1.HOUR_ID) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ JOIN (
|
|
|
+ SELECT csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ GROUP BY csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
GROUP BY t1.hourId,csb.USER_ID
|
|
|
)z1
|
|
|
@@ -1509,7 +1532,18 @@
|
|
|
</if>
|
|
|
-- AND csb.USER_ID='1948586504800468993'
|
|
|
)t1
|
|
|
- JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1' GROUP BY csb1.USER_ID,csb1.HOUR_ID) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ JOIN (
|
|
|
+ SELECT csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ GROUP BY csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
-- AND t1.courseId='1954728193252552705'
|
|
|
GROUP BY t1.hourId,t1.userId
|
|
|
@@ -1646,7 +1680,18 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
)t1
|
|
|
- JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1' GROUP BY csb1.USER_ID,csb1.HOUR_ID) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ JOIN (
|
|
|
+ SELECT csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ GROUP BY csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
-- AND t1.courseId='1954728193252552705'
|
|
|
GROUP BY t1.hourId,t1.userId
|
|
|
@@ -1733,7 +1778,17 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
)t1
|
|
|
- LEFT JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID,csb1.STAY_TIME FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ LEFT JOIN (
|
|
|
+ SELECT csb1.USER_ID,csb1.HOUR_ID,csb1.STAY_TIME
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
-- AND t1.courseId='1954728193252552705'
|
|
|
GROUP BY t1.hourId,t1.userId
|
|
|
@@ -1817,7 +1872,17 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
)t1
|
|
|
- JOIN (SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID,csb1.PROGRESS FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ JOIN (
|
|
|
+ SELECT csb1.ID,csb1.USER_ID,csb1.HOUR_ID,csb1.PROGRESS
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='1' AND csb1.TYPE='1'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
GROUP BY t1.hourId
|
|
|
)z1
|
|
|
@@ -1887,7 +1952,17 @@
|
|
|
</foreach>
|
|
|
</if>
|
|
|
)t1
|
|
|
- JOIN (SELECT csb1.USER_ID,csb1.HOUR_ID FROM COURSE_STUDENT_BURIALPOINT csb1 WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='2' AND csb1.TYPE='2') csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
+ JOIN (
|
|
|
+ SELECT csb1.USER_ID,csb1.HOUR_ID
|
|
|
+ FROM COURSE_STUDENT_BURIALPOINT csb1
|
|
|
+ WHERE csb1.DELETE_FLAG ='NOT_DELETE' AND csb1.FUNC_TYPE='2' AND csb1.TYPE='2'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and csb1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and csb1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ ) csb ON csb.HOUR_ID =t1.hourId AND csb.USER_ID=t1.userId
|
|
|
WHERE 1=1
|
|
|
GROUP BY t1.hourId
|
|
|
)finalSeven ON classhour.hourId =finalSeven.hourId
|
|
|
@@ -1957,7 +2032,16 @@
|
|
|
</if>
|
|
|
GROUP BY stu.ID,cch.ID,cc.ID,ci.COURSE_ID
|
|
|
)t1
|
|
|
- JOIN COURSE_RELATE cr ON t1.hourId=cr.MAIN_ID AND cr.DELETE_FLAG ='NOT_DELETE' and cr.CHAPTERHOUR_TYPE ='1' AND cr.INFO_TYPE ='1' AND FUNC_TYPE ='6'
|
|
|
+ JOIN (
|
|
|
+ select cr1.* from COURSE_RELATE cr1
|
|
|
+ where cr1.DELETE_FLAG ='NOT_DELETE'
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and cr1.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and cr1.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
+ ) cr ON t1.hourId=cr.MAIN_ID AND cr.DELETE_FLAG ='NOT_DELETE' and cr.CHAPTERHOUR_TYPE ='1' AND cr.INFO_TYPE ='1' AND FUNC_TYPE ='6'
|
|
|
WHERE 1=1
|
|
|
GROUP BY t1.hourId
|
|
|
)finalEight ON classhour.hourId =finalEight.hourId
|
|
|
@@ -2035,6 +2119,12 @@
|
|
|
left join FORUM_CHAPTER_DISCUSSION as chapter on reply.POST_ID = chapter.POST_ID
|
|
|
where
|
|
|
reply.POST_TYPE = 3
|
|
|
+ <if test="startTime!=null and startTime != ''">
|
|
|
+ and reply.CREATE_TIME >=#{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime!=null and endTime != ''">
|
|
|
+ and reply.CREATE_TIME <=#{endTime}
|
|
|
+ </if>
|
|
|
)t2 ON t1.chapterId=t2.chapterId AND t1.userId=t2.userId
|
|
|
WHERE 1=1
|
|
|
GROUP BY t1.hourId
|