feat: 新增虚拟支付订单与网盘链接检测功能
This commit is contained in:
@@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="pictureFile != null and pictureFile != ''"> and picture_file = #{pictureFile}</if>
|
||||
<if test="videoFile != null and videoFile != ''"> and video_file = #{videoFile}</if>
|
||||
</where>
|
||||
ORDER BY code_name DESC
|
||||
ORDER BY code_id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectTtCodeByCodeId" parameterType="Long" resultMap="TtCodeResult">
|
||||
@@ -106,4 +106,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{codeId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -16,12 +16,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</sql>
|
||||
|
||||
<select id="selectTtFileList" parameterType="TtFile" resultMap="TtFileResult">
|
||||
<include refid="selectTtFileVo"/>
|
||||
select f.file_id, f.file_name, f.file_url, f.code_name
|
||||
from tt_file f
|
||||
left join (
|
||||
select code_name, max(code_id) as source_order
|
||||
from tt_code
|
||||
group by code_name
|
||||
) c on c.code_name = f.code_name
|
||||
<where>
|
||||
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="codeName != null and codeName != ''"> and code_name like concat('%', #{codeName}, '%')</if>
|
||||
<if test="fileName != null and fileName != ''"> and f.file_name like concat('%', #{fileName}, '%')</if>
|
||||
<if test="codeName != null and codeName != ''"> and f.code_name like concat('%', #{codeName}, '%')</if>
|
||||
</where>
|
||||
ORDER BY code_name DESC, file_id ASC
|
||||
ORDER BY c.source_order DESC, f.file_id ASC
|
||||
</select>
|
||||
|
||||
<select id="selectTtFileByFileId" parameterType="Long" resultMap="TtFileResult">
|
||||
@@ -68,4 +74,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{fileId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -14,34 +14,64 @@
|
||||
<result property="projectUrl" column="project_url" />
|
||||
<result property="projectVurl" column="project_vurl" />
|
||||
<result property="projectBaiduUrl" column="project_baidu_url" />
|
||||
<result property="quarkCheckStatus" column="quark_check_status" />
|
||||
<result property="quarkCheckMessage" column="quark_check_message" />
|
||||
<result property="quarkCheckedAt" column="quark_checked_at" />
|
||||
<result property="baiduCheckStatus" column="baidu_check_status" />
|
||||
<result property="baiduCheckMessage" column="baidu_check_message" />
|
||||
<result property="baiduCheckedAt" column="baidu_checked_at" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTtProjectInfoVo">
|
||||
select id, project_num, project_num1, project_name, project_name1, project_desc, project_url, project_vurl, project_baidu_url from tt_project_info
|
||||
select p.id,
|
||||
p.project_num,
|
||||
p.project_num1,
|
||||
p.project_name,
|
||||
p.project_name1,
|
||||
p.project_desc,
|
||||
p.project_url,
|
||||
p.project_vurl,
|
||||
p.project_baidu_url,
|
||||
quark_check.check_status as quark_check_status,
|
||||
quark_check.check_message as quark_check_message,
|
||||
quark_check.checked_at as quark_checked_at,
|
||||
baidu_check.check_status as baidu_check_status,
|
||||
baidu_check.check_message as baidu_check_message,
|
||||
baidu_check.checked_at as baidu_checked_at
|
||||
from tt_project_info p
|
||||
left join tt_project_link_check quark_check
|
||||
on quark_check.project_id = p.id
|
||||
and quark_check.disk_type = 'QUARK'
|
||||
and quark_check.link_url = p.project_url
|
||||
left join tt_project_link_check baidu_check
|
||||
on baidu_check.project_id = p.id
|
||||
and baidu_check.disk_type = 'BAIDU'
|
||||
and baidu_check.link_url = p.project_baidu_url
|
||||
</sql>
|
||||
|
||||
<select id="selectTtProjectInfoList" parameterType="TtProjectInfo" resultMap="TtProjectInfoResult">
|
||||
<include refid="selectTtProjectInfoVo"/>
|
||||
<where>
|
||||
<if test="projectNum != null and projectNum != ''"> and project_num like concat('%', #{projectNum}, '%')</if>
|
||||
<if test="projectNum1 != null and projectNum1 != ''"> and project_num1 = #{projectNum1}</if>
|
||||
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="projectName1 != null and projectName1 != ''"> and project_name1 like concat('%', #{projectName1}, '%')</if>
|
||||
<if test="projectDesc != null and projectDesc != ''"> and project_desc = #{projectDesc}</if>
|
||||
<if test="projectUrl != null and projectUrl != ''"> and project_url = #{projectUrl}</if>
|
||||
<if test="projectVurl != null and projectVurl != ''"> and project_vurl = #{projectVurl}</if>
|
||||
<if test="projectBaiduUrl != null and projectBaiduUrl != ''"> and project_baidu_url = #{projectBaiduUrl}</if>
|
||||
<if test="projectNum != null and projectNum != ''"> and p.project_num like concat('%', #{projectNum}, '%')</if>
|
||||
<if test="projectNum1 != null and projectNum1 != ''"> and p.project_num1 = #{projectNum1}</if>
|
||||
<if test="projectName != null and projectName != ''"> and p.project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="projectName1 != null and projectName1 != ''"> and p.project_name1 like concat('%', #{projectName1}, '%')</if>
|
||||
<if test="projectDesc != null and projectDesc != ''"> and p.project_desc = #{projectDesc}</if>
|
||||
<if test="projectUrl != null and projectUrl != ''"> and p.project_url = #{projectUrl}</if>
|
||||
<if test="projectVurl != null and projectVurl != ''"> and p.project_vurl = #{projectVurl}</if>
|
||||
<if test="projectBaiduUrl != null and projectBaiduUrl != ''"> and p.project_baidu_url = #{projectBaiduUrl}</if>
|
||||
</where>
|
||||
ORDER BY p.id DESC
|
||||
</select>
|
||||
|
||||
<select id="selectTtProjectInfoById" parameterType="Integer" resultMap="TtProjectInfoResult">
|
||||
<include refid="selectTtProjectInfoVo"/>
|
||||
where id = #{id}
|
||||
where p.id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectTtProjectInfoByName" parameterType="String" resultMap="TtProjectInfoResult">
|
||||
<include refid="selectTtProjectInfoVo"/>
|
||||
where project_name1 = #{codeName}
|
||||
where p.project_name1 = #{codeName}
|
||||
</select>
|
||||
|
||||
<insert id="insertTtProjectInfo" parameterType="TtProjectInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
@@ -96,8 +126,8 @@
|
||||
|
||||
<select id="lastUpdateList" resultMap="TtProjectInfoResult" parameterType="string">
|
||||
<include refid="selectTtProjectInfoVo"/>
|
||||
where project_vurl is not null
|
||||
<if test="searchKey != null and searchKey != ''">AND IFNULL(project_name1, project_name) like CONCAT('%',#{searchKey},'%') </if>
|
||||
ORDER BY project_name DESC
|
||||
where p.project_vurl is not null
|
||||
<if test="searchKey != null and searchKey != ''">AND IFNULL(p.project_name1, p.project_name) like CONCAT('%',#{searchKey},'%') </if>
|
||||
ORDER BY p.project_name DESC
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<?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.office.mapper.TtProjectLinkCheckMapper">
|
||||
|
||||
<insert id="upsertTtProjectLinkCheck" parameterType="TtProjectLinkCheck" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tt_project_link_check
|
||||
(
|
||||
project_id,
|
||||
disk_type,
|
||||
link_url,
|
||||
check_status,
|
||||
provider_code,
|
||||
check_message,
|
||||
response_time_ms,
|
||||
checked_at,
|
||||
create_time,
|
||||
update_time
|
||||
)
|
||||
values
|
||||
(
|
||||
#{projectId},
|
||||
#{diskType},
|
||||
#{linkUrl},
|
||||
#{checkStatus},
|
||||
#{providerCode},
|
||||
#{checkMessage},
|
||||
#{responseTimeMs},
|
||||
#{checkedAt},
|
||||
now(),
|
||||
now()
|
||||
)
|
||||
on duplicate key update
|
||||
link_url = values(link_url),
|
||||
check_status = values(check_status),
|
||||
provider_code = values(provider_code),
|
||||
check_message = values(check_message),
|
||||
response_time_ms = values(response_time_ms),
|
||||
checked_at = values(checked_at),
|
||||
update_time = now()
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByProjectId" parameterType="Integer">
|
||||
delete from tt_project_link_check where project_id = #{projectId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByProjectIds">
|
||||
delete from tt_project_link_check
|
||||
where project_id in
|
||||
<foreach item="projectId" collection="array" open="(" separator="," close=")">
|
||||
#{projectId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user