xiangpei
2025-03-21 49afbb309657585aa82095bf3b7dfc14b1265ac6
flowable/src/main/resources/mapper/ProcessLogMapper.xml
@@ -55,8 +55,38 @@
            TFL.deleted = 0
    </select>
    <select id="projectProcessLogPage" resultMap="BaseResultMap">
        SELECT
            TFL.task_id,
            TFL.task_name,
            TFL.event_type,
            TFL.project_id,
            TFL.process_ins_id,
            TFL.user_id,
            CONCAT(SU.nick_name, '(',COALESCE(SD.dept_name, '无部门'), ')') as 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
        LEFT JOIN sys_dept SD ON SU.dept_id = SD.dept_id
        <where>
            <if test="query.deleted != null">AND TFL.deleted = #{query.deleted}</if>
            <if test="query.userId != null">AND TFL.user_id = #{query.userId}</if>
            <if test="query.processInsId != null and query.processInsId != ''">AND TFL.process_ins_id = #{query.processInsId}</if>
            <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>
            <if test="query.eventTypeList != null and query.eventTypeList.size > 0">
                AND TFL.event_type IN <foreach collection="query.eventTypeList" open="(" separator="," close=")" item="eventType">#{eventType}</foreach>
            </if>
        </where>
        ORDER BY
        TFL.gmt_create DESC
    </select>
    <select id="projectProcessLogList" resultMap="BaseResultMap">
        SELECT
            TFL.task_id,
            TFL.task_name,
@@ -73,11 +103,15 @@
                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>
            <if test="query.deleted != null">TFL.deleted = #{query.deleted}</if>
            AND TFL.process_ins_id = #{query.processInsId}
            <if test="query.deleted != null">AND TFL.deleted = #{query.deleted}</if>
            <if test="query.userId != null">AND TFL.user_id = #{query.userId}</if>
            <if test="query.processInsId != null and query.processInsId != ''">AND TFL.process_ins_id = #{query.processInsId}</if>
            <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>
            <if test="query.eventTypeList != null and query.eventTypeList.size > 0">
                AND TFL.event_type IN <foreach collection="query.eventTypeList" open="(" separator="," close=")" item="eventType">#{eventType}</foreach>
            </if>
        </where>
        ORDER BY
            TFL.gmt_create DESC