From 11a4a369627c2faa093005970f37d3761759fc2f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 21 三月 2025 11:04:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 flowable/src/main/resources/mapper/ProcessLogMapper.xml |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/flowable/src/main/resources/mapper/ProcessLogMapper.xml b/flowable/src/main/resources/mapper/ProcessLogMapper.xml
index 6dd004e..c638af4 100644
--- a/flowable/src/main/resources/mapper/ProcessLogMapper.xml
+++ b/flowable/src/main/resources/mapper/ProcessLogMapper.xml
@@ -72,10 +72,26 @@
             t_process_log TFL
                 LEFT JOIN sys_user SU ON SU.user_id = TFL.user_id
                 LEFT JOIN sys_dept SD ON SU.dept_id = SD.dept_id
-        WHERE
-            TFL.deleted = 0 AND TFL.project_id = #{query.projectId} AND TFL.process_ins_id = #{query.processInsId}
+        <where>
+            <if test="query.deleted != null">TFL.deleted = #{query.deleted}</if>
+            AND TFL.process_ins_id = #{query.processInsId}
+            <if test="query.taskId != null and query.taskId != ''">AND TFL.task_id = #{query.taskId}</if>
+            <if test="query.projectId != null and query.projectId != ''">AND TFL.project_id = #{query.projectId}</if>
+            <if test="query.taskDefKey != null and query.taskDefKey != ''">AND TFL.task_def_key = #{query.taskDefKey}</if>
+        </where>
         ORDER BY
             TFL.gmt_create DESC
     </select>
 
+    <select id="getAllHangup" resultType="java.lang.String">
+        SELECT task_id
+        FROM (
+                 SELECT task_id,
+                        COUNT(*) AS num
+                 FROM t_process_log
+                 WHERE task_id IS NOT NULL
+                 GROUP BY task_id
+                 HAVING MOD(num, 2) != 0
+             ) AS t;
+    </select>
 </mapper>

--
Gitblit v1.8.0