|
@@ -199,7 +199,7 @@
|
|
|
</sql>
|
|
|
|
|
|
<sql id="courseIgnore">
|
|
|
- AND cs.del_flag_ = 0 AND cs.is_lock_ = 0 and cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.is_lock_ = 0 and cs.pre_course_flag_ != 1
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
</sql>
|
|
|
|
|
@@ -1152,7 +1152,7 @@
|
|
|
<where>
|
|
|
cssp.user_id_=#{userId}
|
|
|
AND cs.status_ != 'NOT_START'
|
|
|
- AND cs.del_flag_ = 0
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL) AND cs.pre_course_flag_ != 1
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
<if test="teachMode!=null and teachMode!=''">
|
|
@@ -1897,7 +1897,7 @@
|
|
|
</foreach>
|
|
|
)
|
|
|
and cs.tenant_id_ = #{tenantId}
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
|
|
|
</select>
|
|
|
<select id="findByClassDateAndStu" resultMap="CourseSchedule">
|
|
@@ -1921,7 +1921,7 @@
|
|
|
</foreach>
|
|
|
)
|
|
|
and cs.tenant_id_ = #{tenantId} AND cssp.user_id_ = #{userId}
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_=0)
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
|
|
|
</select>
|
|
|
|
|
@@ -2012,7 +2012,7 @@
|
|
|
AND cs.class_date_ BETWEEN #{startDate} AND #{endDate}
|
|
|
AND cs.group_type_ = 'MUSIC'
|
|
|
and cs.tenant_id_ = #{tenantId}
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_ = 0) AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
|
|
|
<select id="findByClassGroup" resultMap="CourseSchedule">
|
|
@@ -2224,7 +2224,7 @@
|
|
|
WHERE cs.music_group_id_ = #{musicGroupId}
|
|
|
and cs.group_type_ = 'MUSIC'
|
|
|
and cs.status_ != 'OVER'
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
<select id="findClassGroupCourseSchedules" resultMap="CourseSchedule">
|
|
@@ -2252,7 +2252,7 @@
|
|
|
cs.schoole_id_
|
|
|
FROM course_schedule cs
|
|
|
WHERE cs.class_group_id_ = #{classGroupId}
|
|
|
- AND (cs.del_flag_ = 0 OR cs.del_flag_ IS NULL) AND cs.pre_course_flag_ != 1
|
|
|
+ AND (cs.del_flag_ = '0' OR cs.del_flag_ IS NULL) AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
<select id="countVipGroupCourses" resultType="int">
|
|
|
SELECT count(cs.id_)
|
|
@@ -2294,21 +2294,21 @@
|
|
|
<foreach collection="vipGroupIds" open="(" close=")" separator="," item="item">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND cs.group_type_ = #{groupType} AND cs.del_flag_ = 0
|
|
|
+ AND cs.group_type_ = #{groupType} AND cs.del_flag_ = '0'
|
|
|
GROUP BY cs.music_group_id_
|
|
|
</select>
|
|
|
<select id="countTotalCourseScheduleNumWithGroup" resultType="int">
|
|
|
SELECT COUNT(cs.id_)
|
|
|
FROM course_schedule cs
|
|
|
WHERE cs.music_group_id_ = #{groupId}
|
|
|
- AND cs.group_type_ = #{groupType} AND cs.del_flag_ = 0
|
|
|
+ AND cs.group_type_ = #{groupType} AND cs.del_flag_ = '0'
|
|
|
</select>
|
|
|
<select id="countCourseScheduleNum" resultType="java.util.Map">
|
|
|
SELECT cs.music_group_id_ 'key',COUNT(cs.id_) 'value' FROM course_schedule cs WHERE cs.music_group_id_ IN
|
|
|
<foreach collection="vipGroupIds" open="(" close=")" separator="," item="item">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND cs.group_type_ = #{groupType} AND cs.status_ != 'NOT_START' AND cs.del_flag_ = 0
|
|
|
+ AND cs.group_type_ = #{groupType} AND cs.status_ != 'NOT_START' AND cs.del_flag_ = '0'
|
|
|
GROUP BY cs.music_group_id_
|
|
|
</select>
|
|
|
<select id="countTotalNumByClassGroupId" resultType="java.util.Map">
|
|
@@ -2323,7 +2323,7 @@
|
|
|
<if test="preCourseFlag != null">
|
|
|
AND cs.pre_course_flag_ = #{preCourseFlag}
|
|
|
</if>
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
GROUP BY cs.class_group_id_
|
|
|
</select>
|
|
|
<select id="countPreTotalNumByClassGroupId" resultType="java.util.Map">
|
|
@@ -2332,7 +2332,7 @@
|
|
|
<foreach collection="classGroupIds" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ = 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ = 1
|
|
|
GROUP BY cs.class_group_id_
|
|
|
</select>
|
|
|
<select id="countTotalNumByClassGroupIds" resultType="java.util.Map">
|
|
@@ -2347,7 +2347,7 @@
|
|
|
<if test="endClassDate != null">
|
|
|
AND cs.class_date_ <= DATE_FORMAT(#{endClassDate}, '%Y%m%d')
|
|
|
</if>
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
GROUP BY cs.class_group_id_
|
|
|
</select>
|
|
|
<select id="queryCourseTypeByClassGroupIds" resultType="java.lang.String">
|
|
@@ -2360,7 +2360,7 @@
|
|
|
<if test="dto.endSchoolTerm != null">
|
|
|
AND cs.class_date_ <= DATE_FORMAT(#{dto.endSchoolTerm}, '%Y%m%d')
|
|
|
</if>
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
UNION ALL
|
|
|
SELECT DISTINCT tp.course_type_ type_ FROM music_group_train_plan tp
|
|
|
WHERE tp.class_group_id_ = #{dto.classGroupId}
|
|
@@ -2380,7 +2380,7 @@
|
|
|
<if test="teacherId != null">
|
|
|
AND cs.actual_teacher_id_ = #{teacherId}
|
|
|
</if>
|
|
|
- AND cs.status_ = 'NOT_START' AND cs.del_flag_ = 0 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_) AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.status_ = 'NOT_START' AND cs.del_flag_ = '0' AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_) AND cs.pre_course_flag_ != 1
|
|
|
GROUP BY cs.class_group_id_
|
|
|
</select>
|
|
|
<select id="countCurrentNumByClassId" resultType="java.lang.Integer">
|
|
@@ -2389,7 +2389,7 @@
|
|
|
<if test="teacherId != null">
|
|
|
AND cs.actual_teacher_id_ = #{teacherId}
|
|
|
</if>
|
|
|
- AND cs.status_ = 'NOT_START' AND cs.del_flag_ = 0 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_) AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.status_ = 'NOT_START' AND cs.del_flag_ = '0' AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_) AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
|
|
|
<select id="countExpendNumByClassGroupId" resultType="java.util.Map">
|
|
@@ -2398,7 +2398,7 @@
|
|
|
<foreach collection="classGroupIds" item="item" separator="," open="(" close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- AND cs.status_ != 'NOT_START' AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.status_ != 'NOT_START' AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
GROUP BY cs.class_group_id_
|
|
|
</select>
|
|
|
<select id="countExpendNumByClassGroupIds" resultType="java.util.Map">
|
|
@@ -2413,7 +2413,7 @@
|
|
|
<if test="endClassDate != null">
|
|
|
AND cs.class_date_ <= DATE_FORMAT(#{endClassDate}, '%Y%m%d')
|
|
|
</if>
|
|
|
- AND cs.status_ != 'NOT_START' AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
+ AND cs.status_ != 'NOT_START' AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
GROUP BY cs.class_group_id_
|
|
|
</select>
|
|
|
|
|
@@ -2508,7 +2508,7 @@
|
|
|
|
|
|
<sql id="endFindCourseSchedulesCondition">
|
|
|
<where>
|
|
|
- cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 and cs.tenant_id_ = #{tenantId}
|
|
|
+ cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 and cs.tenant_id_ = #{tenantId}
|
|
|
<include refid="queryVipCourseScheduleIds"/>
|
|
|
</where>
|
|
|
</sql>
|
|
@@ -2579,7 +2579,7 @@
|
|
|
WHERE FIND_IN_SET(cs.class_group_id_, #{classGroupIds})
|
|
|
AND cs.status_ = 'NOT_START'
|
|
|
AND cs.class_date_ >= DATE_FORMAT(#{fromDate}, "%Y-%m-%d")
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_ = 0) AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
|
|
|
<select id="findGroupCourseStartTime" resultType="java.util.Date">
|
|
@@ -3018,7 +3018,7 @@
|
|
|
AND del_flag_ = 0) c
|
|
|
WHERE cs.class_group_id_ = c.class_group_id_
|
|
|
AND CONCAT(cs.class_date_, " ", cs.start_class_time_) <= c.class_date_
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
<select id="findCourseSchedulesByClassGroups" resultMap="CourseSchedule">
|
|
|
SELECT
|
|
@@ -3077,7 +3077,7 @@
|
|
|
FROM course_schedule cs
|
|
|
WHERE cs.group_type_ = #{groupType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
AND cs.music_group_id_ = #{groupId}
|
|
|
- AND cs.del_flag_ = 0
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
ORDER BY CONCAT(cs.class_date_, ' ', cs.start_class_time_)
|
|
|
LIMIT 1
|
|
|
</select>
|
|
@@ -3274,14 +3274,14 @@
|
|
|
FROM course_schedule cs
|
|
|
WHERE cs.music_group_id_ = #{groupId}
|
|
|
AND cs.group_type_ = #{groupType}
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
<select id="findCourseByGroupIds" resultMap="CourseSchedule">
|
|
|
SELECT
|
|
|
<include refid="resultSql"></include>
|
|
|
FROM course_schedule cs
|
|
|
WHERE cs.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
- AND cs.del_flag_ = 0
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = 0) AND cs.pre_course_flag_ != 1
|
|
|
AND cs.music_group_id_ IN
|
|
|
<foreach collection="groupIds" item="groupId" open="(" close=")" separator=",">
|
|
@@ -3346,8 +3346,8 @@
|
|
|
<if test="status != null">
|
|
|
AND cs.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
- AND (cs.is_lock_ IS NULL OR cs.is_lock_ =0)
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_ =0)
|
|
|
+ AND cs.is_lock_ =0
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
GROUP BY cssp.user_id_
|
|
|
</select>
|
|
|
|
|
@@ -3380,8 +3380,8 @@
|
|
|
#{studentId}
|
|
|
</foreach>
|
|
|
AND cssp.group_type_ = #{groupType}
|
|
|
- AND (cs.is_lock_ IS NULL OR cs.is_lock_ =0)
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_ =0)
|
|
|
+ AND cs.is_lock_ =0
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
GROUP BY cssp.user_id_;
|
|
|
</select>
|
|
|
|
|
@@ -3399,8 +3399,8 @@
|
|
|
</foreach>
|
|
|
AND cssp.group_type_ = 'VIP'
|
|
|
AND vg.group_status_!=3
|
|
|
- AND (cs.is_lock_ IS NULL OR cs.is_lock_ =0)
|
|
|
- AND (cs.del_flag_ IS NULL OR cs.del_flag_ =0)
|
|
|
+ AND cs.is_lock_ =0
|
|
|
+ AND cs.del_flag_ = '0'
|
|
|
GROUP BY cssp.user_id_;
|
|
|
</select>
|
|
|
|
|
@@ -3441,12 +3441,12 @@
|
|
|
<select id="getLastTime" resultType="java.util.Date">
|
|
|
SELECT MAX(CONCAT(cs.class_date_," ",cs.end_class_time_))
|
|
|
FROM course_schedule cs
|
|
|
- WHERE cs.music_group_id_ = #{practiceGroupId} AND cs.del_flag_ = 0 AND cs.group_type_ = #{groupType};
|
|
|
+ WHERE cs.music_group_id_ = #{practiceGroupId} AND cs.del_flag_ = '0' AND cs.group_type_ = #{groupType};
|
|
|
</select>
|
|
|
<select id="getFirstTime" resultType="java.util.Date">
|
|
|
SELECT MIN(CONCAT(cs.class_date_," ",cs.end_class_time_))
|
|
|
FROM course_schedule cs
|
|
|
- WHERE cs.music_group_id_ = #{practiceGroupId} AND cs.del_flag_ = 0 AND cs.group_type_ = #{groupType};
|
|
|
+ WHERE cs.music_group_id_ = #{practiceGroupId} AND cs.del_flag_ = '0' AND cs.group_type_ = #{groupType};
|
|
|
</select>
|
|
|
<select id="countStudentVipCoursesWithDate" resultType="map">
|
|
|
SELECT
|
|
@@ -3527,13 +3527,13 @@
|
|
|
cs.organ_id_ FROM course_schedule cs
|
|
|
LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
|
|
|
WHERE FIND_IN_SET(cs.class_group_id_,#{classGroupIds}) AND csts.teacher_role_ = #{teacherRole}
|
|
|
- AND csts.user_id_ = #{teacherId} AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW() AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ AND csts.user_id_ = #{teacherId} AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW() AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
</select>
|
|
|
<select id="queryHasReatClass" resultType="java.util.Map">
|
|
|
SELECT cgtm.class_group_id_ 'key',CASE WHEN COUNT(cs.id_) > 0 THEN 1 ELSE 0 END 'value'
|
|
|
FROM class_group_teacher_mapper cgtm
|
|
|
LEFT JOIN course_schedule cs ON cs.class_group_id_ = cgtm.class_group_id_
|
|
|
- AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW() AND cs.del_flag_ = 0
|
|
|
+ AND CONCAT(cs.class_date_,' ',cs.start_class_time_) > NOW() AND cs.del_flag_ = '0'
|
|
|
WHERE cgtm.user_id_ = #{teacherId} AND cgtm.group_type_ = 'MUSIC' AND cs.pre_course_flag_ != 1 AND cgtm.class_group_id_ IN
|
|
|
<foreach collection="classGroupIds" item="classGroupId" separator="," open="(" close=")">
|
|
|
#{classGroupId}
|
|
@@ -3644,7 +3644,7 @@
|
|
|
LEFT JOIN course_schedule_student_payment cssp ON cs.id_=cssp.course_schedule_id_
|
|
|
LEFT JOIN course_schedule_teacher_salary csts ON cs.id_=csts.course_schedule_id_
|
|
|
LEFT JOIN organization o ON cs.organ_id_=o.id_
|
|
|
- WHERE cs.organ_id_!=41 AND cs.del_flag_=0 AND cs.class_date_ >= '2020-11-01'
|
|
|
+ WHERE cs.organ_id_!=41 AND cs.del_flag_ = '0' AND cs.class_date_ >= '2020-11-01'
|
|
|
</select>
|
|
|
|
|
|
<select id="countCourseMergeTime" resultType="int">
|
|
@@ -3852,9 +3852,8 @@
|
|
|
course_schedule cs
|
|
|
LEFT JOIN course_schedule_teacher_salary csts ON csts.course_schedule_id_ = cs.id_
|
|
|
LEFT JOIN school s ON cs.schoole_id_=s.id_
|
|
|
- WHERE
|
|
|
- ( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
|
|
|
- AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
|
|
|
+ WHERE cs.del_flag_ = '0'
|
|
|
+ AND cs.is_lock_=0
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
|
|
|
AND csts.user_id_ = #{teacherId} AND cs.pre_course_flag_ != 1
|
|
|
<if test="startDay!=null and startDay!=''">
|
|
@@ -3873,8 +3872,8 @@
|
|
|
|
|
|
<sql id="queryTeacherCourseCondition">
|
|
|
<where>
|
|
|
- ( cs.del_flag_ IS NULL OR cs.del_flag_ = 0 )
|
|
|
- AND (cs.is_lock_=0 OR cs.is_lock_ IS NULL)
|
|
|
+ cs.del_flag_ = '0'
|
|
|
+ AND cs.is_lock_=0
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_=cs.id_)
|
|
|
AND cs.class_date_ >= "2021-03-01" AND cs.pre_course_flag_ != 1
|
|
|
<if test="teacherId!=null">
|
|
@@ -3981,7 +3980,7 @@
|
|
|
SELECT CONCAT(cs.class_date_,' ',cs.start_class_time_,'~',end_class_time_) start_class_time_ FROM course_schedule cs
|
|
|
WHERE cs.class_date_ BETWEEN #{dto.startSchoolTerm} AND #{dto.endSchoolTerm}
|
|
|
AND cs.class_group_id_ = #{dto.classGroupId} AND cs.type_ = #{dto.courseScheduleType}
|
|
|
- AND cs.is_lock_ = 0 AND cs.pre_course_flag_ != 1 AND cs.del_flag_ = 0
|
|
|
+ AND cs.is_lock_ = 0 AND cs.pre_course_flag_ != 1 AND cs.del_flag_ = '0'
|
|
|
ORDER BY cs.class_date_,cs.start_class_time_
|
|
|
</select>
|
|
|
<select id="countCourseByClassAndType" resultType="int">
|
|
@@ -3993,7 +3992,7 @@
|
|
|
<if test="dto.endSchoolTerm != null">
|
|
|
AND cs.class_date_ <= DATE_FORMAT(#{dto.endSchoolTerm}, '%Y%m%d')
|
|
|
</if>
|
|
|
- AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
+ AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND cs.is_lock_ = 0
|
|
|
</select>
|
|
|
<select id="getCourseNumNo" resultType="int">
|
|
|
SELECT COUNT(id_) FROM course_schedule
|
|
@@ -4049,7 +4048,7 @@
|
|
|
<select id="queryHasCourseStudentIds" resultType="java.lang.Integer">
|
|
|
SELECT DISTINCT s.user_id_ FROM student s
|
|
|
LEFT JOIN course_schedule_student_payment cssp ON s.user_id_ = cssp.user_id_
|
|
|
- LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.group_type_ = #{groupType} AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1
|
|
|
+ LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_ AND cs.group_type_ = #{groupType} AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1
|
|
|
LEFT JOIN sys_user su ON su.id_ = s.user_id_
|
|
|
WHERE 1=1 and s.tenant_id_ = #{tenantId}
|
|
|
<if test="hasMember != null">
|
|
@@ -4097,7 +4096,7 @@
|
|
|
<sql id="queryCourseEvaluateSql">
|
|
|
<where>
|
|
|
cs.status_ = 'OVER' AND ta.sign_in_time_ IS NOT NULL AND cs.group_type_ != 'LIVE'
|
|
|
- AND cs.del_flag_ = 0 AND (cs.is_lock_ = 0 OR cs.is_lock_ IS NULL) AND cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND (cs.is_lock_ = 0 OR cs.is_lock_ IS NULL) AND cs.pre_course_flag_ != 1
|
|
|
AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_) AND sa.id_ IS NOT NULL
|
|
|
<if test="teacherId != null">
|
|
|
AND ta.teacher_id_ = #{teacherId}
|
|
@@ -4365,7 +4364,7 @@
|
|
|
select cs.type_ scheduleType,COUNT(CASE WHEN cs.status_ = 'NOT_START' THEN 1 END) subCourseNum,
|
|
|
COUNT(cs.id_) totalCourseNum
|
|
|
from course_schedule cs
|
|
|
- where cs.group_type_ = 'MUSIC' AND cs.is_lock_ = 0 AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
+ where cs.group_type_ = 'MUSIC' AND cs.is_lock_ = 0 AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
AND cs.class_date_ BETWEEN #{startTerm} AND #{endTerm}
|
|
|
AND cs.music_group_id_ IN
|
|
|
<foreach collection="musicGroupIds" item="musicGroupId" open="(" separator="," close=")">
|
|
@@ -4383,7 +4382,7 @@
|
|
|
<select id="getDailySummaryOfClassesForTheCurrentSemester" resultMap="DailySummaryMap">
|
|
|
select cs.class_date_ courseDate,cs.type_ scheduleType,COUNT(cs.id_) totalCourseNum
|
|
|
from course_schedule cs
|
|
|
- where cs.group_type_ = 'MUSIC' AND cs.is_lock_ = 0 AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
+ where cs.group_type_ = 'MUSIC' AND cs.is_lock_ = 0 AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
AND cs.class_date_ BETWEEN #{startTerm} AND #{endTerm}
|
|
|
AND cs.music_group_id_ IN
|
|
|
<foreach collection="musicGroupIds" item="musicGroupId" open="(" separator="," close=")">
|
|
@@ -4395,7 +4394,7 @@
|
|
|
select cs.id_ courseId,CONCAT(cs.class_date_,' ',cs.start_class_time_,'~',cs.end_class_time_) classDate,cs.status_ courseStatus,cs.name_ courseName,
|
|
|
actual_teacher_id_ teacherId,cs.music_group_id_ musicGroupId,cs.teach_mode_ teachMode
|
|
|
from course_schedule cs
|
|
|
- where cs.group_type_ = 'MUSIC' AND cs.is_lock_ = 0 AND cs.del_flag_ = 0 AND cs.pre_course_flag_ != 1 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
+ where cs.group_type_ = 'MUSIC' AND cs.is_lock_ = 0 AND cs.del_flag_ = '0' AND cs.pre_course_flag_ != 1 AND (cs.new_course_id_ IS NULL OR cs.new_course_id_ = cs.id_)
|
|
|
<if test="classDate != null and classDate != ''">
|
|
|
AND cs.class_date_ = #{classDate}
|
|
|
</if>
|
|
@@ -4479,7 +4478,7 @@
|
|
|
left join course_schedule_student_payment cssp ON cs.id_ = cssp.course_schedule_id_
|
|
|
left join organization o ON o.id_ = cs.organ_id_
|
|
|
where DATE_FORMAT(cs.class_date_,'%Y-%m') = #{month} AND cssp.actual_price_ > 0
|
|
|
- AND cs.del_flag_ = 0 AND cs.is_lock_ = 0 and cs.pre_course_flag_ != 1
|
|
|
+ AND cs.del_flag_ = '0' AND cs.is_lock_ = 0 and cs.pre_course_flag_ != 1
|
|
|
AND cs.tenant_id_ = 1
|
|
|
group by cs.id_ order by cs.organ_id_;
|
|
|
</select>
|