From 973caddffafba85e75a84c09d77e3ea53c27903f Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 12 二月 2025 22:29:09 +0800
Subject: [PATCH] flowable模块中的流程日志移动到business模块,新增流程推进日志接口

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

diff --git a/flowable/src/main/resources/mapper/ProcessLogMapper.xml b/flowable/src/main/resources/mapper/ProcessLogMapper.xml
index a377afe..cea40f0 100644
--- a/flowable/src/main/resources/mapper/ProcessLogMapper.xml
+++ b/flowable/src/main/resources/mapper/ProcessLogMapper.xml
@@ -5,10 +5,12 @@
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <resultMap id="BaseResultMap" type="com.ycl.domain.vo.ProcessLogVO">
         <result column="task_id" property="taskId" />
-        <result column="event_type" property="eventType" />
+        <result column="event_type" property="eventType" typeHandler="com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler"/>
         <result column="project_id" property="projectId" />
         <result column="flow_ins_id" property="flowInsId" />
         <result column="user_id" property="userId" />
+        <result column="nick_name" property="nickName" />
+        <result column="gmt_create" property="gmtCreate" />
         <result column="event_data_json" property="eventDataJson" />
     </resultMap>
 
@@ -42,6 +44,7 @@
             TFL.flow_ins_id,
             TFL.user_id,
             TFL.event_data_json,
+            TFL.gmt_create,
             TFL.id
         FROM
             t_process_log TFL
@@ -49,4 +52,25 @@
             TFL.deleted = 0
     </select>
 
+
+    <select id="projectProcessLogPage" resultMap="BaseResultMap">
+        SELECT
+            TFL.task_id,
+            TFL.event_type,
+            TFL.project_id,
+            TFL.flow_ins_id,
+            TFL.user_id,
+            SU.nick_name,
+            TFL.event_data_json,
+            TFL.gmt_create,
+            TFL.id
+        FROM
+            t_process_log TFL
+                LEFT JOIN sys_user SU ON SU.user_id = TFL.user_id
+        WHERE
+            TFL.deleted = 0 AND TFL.project_id = #{query.projectId} AND TFL.process_ins_id = #{query.processInsId}
+        ORDER BY
+            TFL.gmt_create DESC
+    </select>
+
 </mapper>

--
Gitblit v1.8.0