This commit is contained in:
PQZ 2025-02-08 17:26:41 +08:00
parent 6a85ce60bd
commit 707d98d8b8

View File

@ -17,8 +17,7 @@
<where> <where>
main.deleted = 0 main.deleted = 0
<if test="entity.type != null and entity.type != '' ">and main.type = #{entity.type}</if> <if test="entity.type != null and entity.type != '' ">and main.type = #{entity.type}</if>
<if test="entity.name != null and entity.name != ''">and main.name like concat('%', #{entity.name}, '%') <if test="entity.name != null and entity.name != ''">and main.name like concat('%', #{entity.name}, '%')</if>
</if>
<if test="entity.phone != null and entity.phone != ''">and main.phone like concat('%', #{entity.phone},'%') <if test="entity.phone != null and entity.phone != ''">and main.phone like concat('%', #{entity.phone},'%')
</if> </if>
</where> </where>
@ -32,10 +31,10 @@
main.seniority AS seniority, main.seniority AS seniority,
main.car_id AS carId, main.car_id AS carId,
main.phone AS phone, main.phone AS phone,
GROUP_CONCAT(dscc.course_type SEPARATOR ',') AS courseTypes GROUP_CONCAT(DISTINCT dscc.course_type SEPARATOR ',') AS courseTypes
FROM FROM
drive_school_coach main drive_school_coach main
LEFT JOIN drive_school_coach_course dscc ON main.id = dscc.coach_id LEFT JOIN drive_school_coach_course dscc ON main.id = dscc.coach_id AND dscc.deleted = 0
<where> <where>
main.deleted = 0 main.deleted = 0
<if test="entity.type != null and entity.type != ''"> <if test="entity.type != null and entity.type != ''">
@ -43,7 +42,7 @@
</if> </if>
</where> </where>
GROUP BY GROUP BY
main.id,dscc.course_type main.id
order by main.create_time desc order by main.create_time desc
</select> </select>
</mapper> </mapper>