This commit is contained in:
PQZ 2025-02-19 18:12:05 +08:00
parent cec4058a27
commit 3e66678b5d
2 changed files with 11 additions and 11 deletions

View File

@ -97,5 +97,5 @@ public interface DlDriveSchoolStudentMapper extends BaseMapper<DlDriveSchoolStud
* @author PQZ * @author PQZ
* @date 17:08 2025/2/19 * @date 17:08 2025/2/19
**/ **/
List<StudentCountVO> indexGetTrainList(String type, Long coachId, String startTime, String endTime); List<StudentCountVO> indexGetTrainList(@Param("type")String type, @Param("coachId")Long coachId, @Param("startTime")String startTime, @Param("endTime")String endTime);
} }

View File

@ -155,20 +155,20 @@
FROM FROM
drive_school_coach c drive_school_coach c
LEFT JOIN drive_school_student s ON c.id = s.source_user_id LEFT JOIN drive_school_student s ON c.id = s.source_user_id
<if test="type != null and type != ''">
AND s.source = #{type}
</if>
LEFT JOIN drive_school_course_order o ON s.user_id = o.user_id AND o.payment_status > 1 LEFT JOIN drive_school_course_order o ON s.user_id = o.user_id AND o.payment_status > 1
<if test="startTime != null and startTime != ''">
AND o.create_time &gt;= #{starTime}
</if>
<if test="endTime != null and endTime != ''">
AND o.create_time &lt;= #{endTime}
</if>
WHERE WHERE
c.deleted = 0 c.deleted = 0
<if test="type != null and type != ''">
AND s.source = #{type}
</if>
<if test="coachId != null and coachId != ''"> <if test="coachId != null and coachId != ''">
AND c.id = #{coachId} AND c.user_id = #{coachId}
</if>
<if test="starTime != null and starTime != ''">
AND o.create_time &gt;= #{starTime}
</if>
<if test="endTime != null and endTime != ''">
AND o.create_time &lt;= #{endTime}
</if> </if>
GROUP BY GROUP BY
c.image, c.NAME, c.car_id c.image, c.NAME, c.car_id