This commit is contained in:
2025-11-07 01:23:40 +08:00
parent 8b8b6d8797
commit 92d4338bb5
4 changed files with 413 additions and 0 deletions

View File

@@ -2,6 +2,9 @@ package com.ruoyi.jarvis.mapper;
import com.ruoyi.jarvis.domain.TencentDocOperationLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 腾讯文档操作日志Mapper接口
@@ -17,5 +20,22 @@ public interface TencentDocOperationLogMapper {
* @return 结果
*/
int insertLog(TencentDocOperationLog log);
/**
* 查询操作日志列表
*
* @param log 操作日志
* @return 操作日志集合
*/
List<TencentDocOperationLog> selectLogList(TencentDocOperationLog log);
/**
* 查询最近的操作日志
*
* @param fileId 文件ID
* @param limit 限制数量
* @return 操作日志集合
*/
List<TencentDocOperationLog> selectRecentLogs(@Param("fileId") String fileId, @Param("limit") int limit);
}

View File

@@ -49,5 +49,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<sql id="selectLogVo">
select id, file_id, sheet_id, operation_type, order_no, target_row,
logistics_link, operation_status, error_message, operator,
create_time, remark
from tencent_doc_operation_log
</sql>
<select id="selectLogList" parameterType="com.ruoyi.jarvis.domain.TencentDocOperationLog" resultMap="TencentDocOperationLogResult">
<include refid="selectLogVo"/>
<where>
<if test="fileId != null and fileId != ''">
AND file_id = #{fileId}
</if>
<if test="sheetId != null and sheetId != ''">
AND sheet_id = #{sheetId}
</if>
<if test="operationType != null and operationType != ''">
AND operation_type = #{operationType}
</if>
<if test="orderNo != null and orderNo != ''">
AND order_no = #{orderNo}
</if>
<if test="operationStatus != null and operationStatus != ''">
AND operation_status = #{operationStatus}
</if>
</where>
order by create_time desc
</select>
<select id="selectRecentLogs" resultMap="TencentDocOperationLogResult">
<include refid="selectLogVo"/>
<where>
<if test="fileId != null and fileId != ''">
AND file_id = #{fileId}
</if>
</where>
order by create_time desc
limit #{limit}
</select>
</mapper>