|
@@ -61,37 +61,29 @@
|
|
|
</update>
|
|
|
<select id="convertSearchInstructorVOPage" resultType="org.jeecg.modules.app.vo.SearchVO$SearchInstructorVO">
|
|
|
SELECT
|
|
|
- a.id,
|
|
|
- b.realname AS name,
|
|
|
- b.avatar,
|
|
|
- c.depart_name AS orgName,
|
|
|
- a.excel_msg,
|
|
|
- a.teaching_philosophy,
|
|
|
- a.good_rate,
|
|
|
- a.classes_number,
|
|
|
- b.id AS userId,
|
|
|
- a.org_code AS orgCode,
|
|
|
- COUNT( DISTINCT d.user_id, c2.id ) AS orderCount
|
|
|
- FROM
|
|
|
- nm_instructor a
|
|
|
- LEFT JOIN sys_user b ON a.user_id = b.id
|
|
|
- LEFT JOIN sys_depart c ON b.org_code = c.org_code
|
|
|
- LEFT JOIN nm_courses d ON a.user_id = d.user_id
|
|
|
- LEFT JOIN nm_order_pro_info c2 ON d.user_id = c2.family_user_id
|
|
|
+ a.id,
|
|
|
+ b.realname AS name,
|
|
|
+ b.avatar,
|
|
|
+ s.name AS orgName,
|
|
|
+ a.excel_msg,
|
|
|
+ a.teaching_philosophy,
|
|
|
+ a.good_rate,
|
|
|
+ a.classes_number,
|
|
|
+ b.id AS userId,
|
|
|
+ a.org_code AS orgCode,
|
|
|
+ COUNT(DISTINCT d.user_id, c2.id) AS orderCount,
|
|
|
+ a.training_programs
|
|
|
+ FROM nm_instructor a
|
|
|
+ LEFT JOIN sys_user b ON a.user_id = b.id
|
|
|
+ LEFT JOIN sys_depart c ON b.org_code = c.org_code
|
|
|
+ LEFT JOIN nm_site s ON c.org_code = s.org_code
|
|
|
+ LEFT JOIN nm_courses d ON a.user_id = d.user_id
|
|
|
+ LEFT JOIN nm_order_pro_info c2 ON d.user_id = c2.family_user_id
|
|
|
WHERE 1=1
|
|
|
- <if test="searchDTO.keyword != null and searchDTO.keyword == ''">
|
|
|
- AND (b.realname LIKE CONCAT('%',#{searchDTO.keyword},'%') OR c.depart_name LIKE CONCAT('%',#{searchDTO.keyword},'%'))
|
|
|
+ <if test="searchDTO.keyword != null and searchDTO.keyword != ''">
|
|
|
+ AND b.realname LIKE CONCAT('%',#{searchDTO.keyword},'%')
|
|
|
</if>
|
|
|
- GROUP BY
|
|
|
- a.id,
|
|
|
- b.realname,
|
|
|
- b.avatar,
|
|
|
- userId,
|
|
|
- c.depart_name,
|
|
|
- a.excel_msg,
|
|
|
- a.teaching_philosophy,
|
|
|
- a.good_rate,
|
|
|
- a.classes_number
|
|
|
+ GROUP BY a.id
|
|
|
ORDER BY orderCount DESC
|
|
|
</select>
|
|
|
<select id="findCoachList" resultType="org.jeecg.modules.app.vo.coach.AppCoachVO">
|