1
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.jarvis.mapper.TencentDocBatchPushRecordMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.jarvis.domain.TencentDocBatchPushRecord" id="BatchPushRecordResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="fileId" column="file_id" />
|
||||
<result property="sheetId" column="sheet_id" />
|
||||
<result property="pushType" column="push_type" />
|
||||
<result property="triggerSource" column="trigger_source" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="durationMs" column="duration_ms" />
|
||||
<result property="startRow" column="start_row" />
|
||||
<result property="endRow" column="end_row" />
|
||||
<result property="totalRows" column="total_rows" />
|
||||
<result property="successCount" column="success_count" />
|
||||
<result property="skipCount" column="skip_count" />
|
||||
<result property="errorCount" column="error_count" />
|
||||
<result property="status" column="status" />
|
||||
<result property="resultMessage" column="result_message" />
|
||||
<result property="errorMessage" column="error_message" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBatchPushRecordVo">
|
||||
SELECT id, batch_id, file_id, sheet_id, push_type, trigger_source,
|
||||
start_time, end_time, duration_ms, start_row, end_row, total_rows,
|
||||
success_count, skip_count, error_count, status, result_message,
|
||||
error_message, create_time, update_time
|
||||
FROM tencent_doc_batch_push_record
|
||||
</sql>
|
||||
|
||||
<insert id="insertBatchPushRecord" parameterType="com.ruoyi.jarvis.domain.TencentDocBatchPushRecord">
|
||||
INSERT INTO tencent_doc_batch_push_record (
|
||||
batch_id, file_id, sheet_id, push_type, trigger_source,
|
||||
start_time, end_time, duration_ms, start_row, end_row, total_rows,
|
||||
success_count, skip_count, error_count, status, result_message, error_message
|
||||
) VALUES (
|
||||
#{batchId}, #{fileId}, #{sheetId}, #{pushType}, #{triggerSource},
|
||||
#{startTime}, #{endTime}, #{durationMs}, #{startRow}, #{endRow}, #{totalRows},
|
||||
#{successCount}, #{skipCount}, #{errorCount}, #{status}, #{resultMessage}, #{errorMessage}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateBatchPushRecord" parameterType="com.ruoyi.jarvis.domain.TencentDocBatchPushRecord">
|
||||
UPDATE tencent_doc_batch_push_record
|
||||
<set>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="durationMs != null">duration_ms = #{durationMs},</if>
|
||||
<if test="successCount != null">success_count = #{successCount},</if>
|
||||
<if test="skipCount != null">skip_count = #{skipCount},</if>
|
||||
<if test="errorCount != null">error_count = #{errorCount},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="resultMessage != null">result_message = #{resultMessage},</if>
|
||||
<if test="errorMessage != null">error_message = #{errorMessage},</if>
|
||||
</set>
|
||||
WHERE batch_id = #{batchId}
|
||||
</update>
|
||||
|
||||
<select id="selectByBatchId" parameterType="String" resultMap="BatchPushRecordResult">
|
||||
<include refid="selectBatchPushRecordVo"/>
|
||||
WHERE batch_id = #{batchId}
|
||||
</select>
|
||||
|
||||
<select id="selectBatchPushRecordList" parameterType="com.ruoyi.jarvis.domain.TencentDocBatchPushRecord" resultMap="BatchPushRecordResult">
|
||||
<include refid="selectBatchPushRecordVo"/>
|
||||
<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="status != null and status != ''">AND status = #{status}</if>
|
||||
<if test="pushType != null and pushType != ''">AND push_type = #{pushType}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectRecentRecords" resultMap="BatchPushRecordResult">
|
||||
<include refid="selectBatchPushRecordVo"/>
|
||||
<where>
|
||||
<if test="fileId != null and fileId != ''">AND file_id = #{fileId}</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
LIMIT #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectLastSuccessRecord" resultMap="BatchPushRecordResult">
|
||||
<include refid="selectBatchPushRecordVo"/>
|
||||
WHERE file_id = #{fileId}
|
||||
AND sheet_id = #{sheetId}
|
||||
AND status IN ('SUCCESS', 'PARTIAL')
|
||||
ORDER BY end_time DESC
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<resultMap type="com.ruoyi.jarvis.domain.TencentDocOperationLog" id="TencentDocOperationLogResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="batchId" column="batch_id" />
|
||||
<result property="fileId" column="file_id" />
|
||||
<result property="sheetId" column="sheet_id" />
|
||||
<result property="operationType" column="operation_type" />
|
||||
@@ -22,6 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<insert id="insertLog" parameterType="com.ruoyi.jarvis.domain.TencentDocOperationLog">
|
||||
insert into tencent_doc_operation_log
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="batchId != null">batch_id,</if>
|
||||
<if test="fileId != null">file_id,</if>
|
||||
<if test="sheetId != null">sheet_id,</if>
|
||||
<if test="operationType != null">operation_type,</if>
|
||||
@@ -35,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
create_time
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="batchId != null">#{batchId},</if>
|
||||
<if test="fileId != null">#{fileId},</if>
|
||||
<if test="sheetId != null">#{sheetId},</if>
|
||||
<if test="operationType != null">#{operationType},</if>
|
||||
@@ -50,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</insert>
|
||||
|
||||
<sql id="selectLogVo">
|
||||
select id, file_id, sheet_id, operation_type, order_no, target_row,
|
||||
select id, batch_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
|
||||
@@ -89,5 +92,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
limit #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectLogsByBatchId" resultMap="TencentDocOperationLogResult">
|
||||
<include refid="selectLogVo"/>
|
||||
WHERE batch_id = #{batchId}
|
||||
ORDER BY create_time ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user