fix: 报表项目进展的顺序
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<select id="getCommentByProject" resultType="org.agt.module.license.controller.admin.report.vo.ReportProgressProjectRespVO">
|
||||
<include refid="comment"></include>
|
||||
ORDER BY
|
||||
p.update_time DESC,
|
||||
pmt.project_max_update_time DESC,
|
||||
c.update_time DESC
|
||||
</select>
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
LEFT JOIN system_users u ON c.user_id = u.id
|
||||
AND u.deleted = 0
|
||||
LEFT JOIN ( SELECT user_id, max( update_time ) max_update_time FROM crm_comment WHERE deleted = 0 GROUP BY user_id ) mt ON u.id = mt.user_id
|
||||
LEFT JOIN ( SELECT project_id, max( update_time ) project_max_update_time FROM crm_comment WHERE deleted = 0 GROUP BY project_id ) pmt ON p.id = pmt.project_id
|
||||
LEFT JOIN crm_comment pc ON c.parent_id = pc.id
|
||||
AND pc.deleted = 0
|
||||
LEFT JOIN system_users pu ON pc.user_id = pu.id
|
||||
|
||||
Reference in New Issue
Block a user