|
@@ -58,7 +58,7 @@
|
|
|
FROM course_schedule_teacher_salary csts
|
|
|
LEFT JOIN course_schedule cs ON cs.id_ = csts.course_schedule_id_
|
|
|
LEFT JOIN teacher t on t.id_ = csts.user_id_
|
|
|
- WHERE cs.class_date_ >= #{startDate} AND cs.class_date_ <= #{endDate}
|
|
|
+ WHERE cs.class_date_ >= #{startDate} AND cs.class_date_ <= #{endDate} AND csts.group_type_ IN ('VIP','MUSIC') AND cs.del_flag_ != 1
|
|
|
GROUP BY csts.user_id_ HAVING expect_total_salary_ <= #{salary}
|
|
|
]]>
|
|
|
</select>
|
|
@@ -69,8 +69,9 @@
|
|
|
<foreach collection="userIds" item="userId" open="(" separator="," close=")">
|
|
|
#{userId}
|
|
|
</foreach>
|
|
|
+ <![CDATA[AND cs.class_date_ >= #{startDate} AND cs.class_date_ <= #{endDate} AND csts.group_type_ IN ('VIP','MUSIC') AND cs.del_flag_ != 1
|
|
|
GROUP BY csts.user_id_, csts.group_type_;
|
|
|
- </select>
|
|
|
+ ]]></select>
|
|
|
|
|
|
<select id="queryPage" resultMap="TeacherCourseStatistics" parameterType="map">
|
|
|
SELECT tcs.*,u.real_name_,u.phone_,o.name_ organ_name_,DATE_FORMAT(tcs.month_,'%Y年%m月') month_str_,
|
|
@@ -94,7 +95,7 @@
|
|
|
AND FIND_IN_SET(tcs.organ_id_,#{organId})
|
|
|
</if>
|
|
|
<if test="monthStr != null">
|
|
|
- AND DATE_FORMAT(tcs.month_,'%Y-%m-%d') >= #{monthStr}
|
|
|
+ AND DATE_FORMAT(tcs.month_,'%Y-%m') = #{monthStr}
|
|
|
</if>
|
|
|
<if test="userId != null">
|
|
|
AND tcs.user_id_ = #{userId}
|