This commit is contained in:
van
2026-04-03 00:34:07 +08:00
parent 72d5856838
commit c841990b49
14 changed files with 634 additions and 22 deletions

View File

@@ -65,4 +65,19 @@
<delete id="deleteAllWeComInboundTrace">
delete from wecom_inbound_trace
</delete>
<select id="selectTracesShareLinkRemarkDone" resultMap="WeComInboundTraceResult">
<include refid="selectVo"/>
where reply_content like concat('%', #{replyMark}, '%')
order by id asc
</select>
<select id="selectLatestPriorTraceWith3cnLink" resultMap="WeComInboundTraceResult">
<include refid="selectVo"/>
where from_user_name = #{fromUserName}
and id &lt; #{beforeId}
and (content like '%https://3.cn/%' or content like '%http://3.cn/%')
order by id desc
limit 1
</select>
</mapper>

View File

@@ -0,0 +1,72 @@
<?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.WeComShareLinkLogisticsJobMapper">
<resultMap id="WeComShareLinkLogisticsJobResult" type="WeComShareLinkLogisticsJob">
<id property="id" column="id"/>
<result property="jobKey" column="job_key"/>
<result property="fromUserName" column="from_user_name"/>
<result property="trackingUrl" column="tracking_url"/>
<result property="userRemark" column="remark"/>
<result property="touserPush" column="touser_push"/>
<result property="status" column="status"/>
<result property="waybillNo" column="waybill_no"/>
<result property="scanAttempts" column="scan_attempts"/>
<result property="lastNote" column="last_note"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectVo">
select id, job_key, from_user_name, tracking_url, remark, touser_push, status, waybill_no,
scan_attempts, last_note, create_time, update_time
from wecom_share_link_logistics_job
</sql>
<insert id="insertWeComShareLinkLogisticsJob" parameterType="WeComShareLinkLogisticsJob" useGeneratedKeys="true" keyProperty="id">
insert into wecom_share_link_logistics_job (
job_key, from_user_name, tracking_url, remark, touser_push, status, scan_attempts, last_note
<if test="createTime != null">, create_time, update_time</if>
) values (
#{jobKey}, #{fromUserName}, #{trackingUrl}, #{userRemark}, #{touserPush}, #{status},
#{scanAttempts}, #{lastNote}
<if test="createTime != null">, #{createTime}, #{createTime}</if>
)
</insert>
<update id="updateByJobKey">
update wecom_share_link_logistics_job
<set>
<if test="status != null">status = #{status},</if>
<if test="lastNote != null">last_note = #{lastNote},</if>
<if test="scanAttempts != null">scan_attempts = #{scanAttempts},</if>
<if test="waybillNo != null">waybill_no = #{waybillNo},</if>
update_time = now()
</set>
where job_key = #{jobKey}
</update>
<select id="selectByJobKey" resultMap="WeComShareLinkLogisticsJobResult">
<include refid="selectVo"/>
where job_key = #{jobKey}
</select>
<select id="selectWeComShareLinkLogisticsJobList" parameterType="WeComShareLinkLogisticsJob" resultMap="WeComShareLinkLogisticsJobResult">
<include refid="selectVo"/>
<where>
<if test="jobKey != null and jobKey != ''">and job_key = #{jobKey}</if>
<if test="fromUserName != null and fromUserName != ''">and from_user_name like concat('%', #{fromUserName}, '%')</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="trackingUrl != null and trackingUrl != ''">and tracking_url like concat('%', #{trackingUrl}, '%')</if>
<if test="userRemark != null and userRemark != ''">and remark like concat('%', #{userRemark}, '%')</if>
<if test="waybillNo != null and waybillNo != ''">and waybill_no like concat('%', #{waybillNo}, '%')</if>
<if test="params.beginTime != null and params.beginTime != ''">
and create_time &gt;= #{params.beginTime}
</if>
<if test="params.endTime != null and params.endTime != ''">
and create_time &lt;= concat(#{params.endTime}, ' 23:59:59')
</if>
</where>
order by id desc
</select>
</mapper>