2025-08-14 14:57:00 +08:00
|
|
|
<?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.TtProjectInfoMapper">
|
|
|
|
|
|
|
|
|
|
<resultMap type="TtProjectInfo" id="TtProjectInfoResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="projectNum" column="project_num" />
|
|
|
|
|
<result property="projectNum1" column="project_num1" />
|
|
|
|
|
<result property="projectName" column="project_name" />
|
|
|
|
|
<result property="projectName1" column="project_name1" />
|
|
|
|
|
<result property="projectDesc" column="project_desc" />
|
|
|
|
|
<result property="projectUrl" column="project_url" />
|
|
|
|
|
<result property="projectVurl" column="project_vurl" />
|
|
|
|
|
<result property="projectBaiduUrl" column="project_baidu_url" />
|
2026-07-28 13:42:30 +08:00
|
|
|
<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" />
|
2025-08-14 14:57:00 +08:00
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectTtProjectInfoVo">
|
2026-07-28 13:42:30 +08:00
|
|
|
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
|
2025-08-14 14:57:00 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectTtProjectInfoList" parameterType="TtProjectInfo" resultMap="TtProjectInfoResult">
|
|
|
|
|
<include refid="selectTtProjectInfoVo"/>
|
|
|
|
|
<where>
|
2026-07-28 13:42:30 +08:00
|
|
|
<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>
|
2025-08-14 14:57:00 +08:00
|
|
|
</where>
|
2026-07-28 13:42:30 +08:00
|
|
|
ORDER BY p.id DESC
|
2025-08-14 14:57:00 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectTtProjectInfoById" parameterType="Integer" resultMap="TtProjectInfoResult">
|
|
|
|
|
<include refid="selectTtProjectInfoVo"/>
|
2026-07-28 13:42:30 +08:00
|
|
|
where p.id = #{id}
|
2025-08-14 14:57:00 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectTtProjectInfoByName" parameterType="String" resultMap="TtProjectInfoResult">
|
|
|
|
|
<include refid="selectTtProjectInfoVo"/>
|
2026-07-28 13:42:30 +08:00
|
|
|
where p.project_name1 = #{codeName}
|
2025-08-14 14:57:00 +08:00
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertTtProjectInfo" parameterType="TtProjectInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into tt_project_info
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="projectNum != null">project_num,</if>
|
|
|
|
|
<if test="projectNum1 != null">project_num1,</if>
|
|
|
|
|
<if test="projectName != null">project_name,</if>
|
|
|
|
|
<if test="projectName1 != null">project_name1,</if>
|
|
|
|
|
<if test="projectDesc != null">project_desc,</if>
|
|
|
|
|
<if test="projectUrl != null">project_url,</if>
|
|
|
|
|
<if test="projectVurl != null">project_vurl,</if>
|
|
|
|
|
<if test="projectBaiduUrl != null">project_baidu_url,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="projectNum != null">#{projectNum},</if>
|
|
|
|
|
<if test="projectNum1 != null">#{projectNum1},</if>
|
|
|
|
|
<if test="projectName != null">#{projectName},</if>
|
|
|
|
|
<if test="projectName1 != null">#{projectName1},</if>
|
|
|
|
|
<if test="projectDesc != null">#{projectDesc},</if>
|
|
|
|
|
<if test="projectUrl != null">#{projectUrl},</if>
|
|
|
|
|
<if test="projectVurl != null">#{projectVurl},</if>
|
|
|
|
|
<if test="projectBaiduUrl != null">#{projectBaiduUrl},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateTtProjectInfo" parameterType="TtProjectInfo">
|
|
|
|
|
update tt_project_info
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="projectNum != null">project_num = #{projectNum},</if>
|
|
|
|
|
<if test="projectNum1 != null">project_num1 = #{projectNum1},</if>
|
|
|
|
|
<if test="projectName != null">project_name = #{projectName},</if>
|
|
|
|
|
<if test="projectName1 != null">project_name1 = #{projectName1},</if>
|
|
|
|
|
<if test="projectDesc != null">project_desc = #{projectDesc},</if>
|
|
|
|
|
<if test="projectUrl != null">project_url = #{projectUrl},</if>
|
|
|
|
|
<if test="projectVurl != null">project_vurl = #{projectVurl},</if>
|
|
|
|
|
<if test="projectBaiduUrl != null">project_baidu_url = #{projectBaiduUrl},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTtProjectInfoById" parameterType="Integer">
|
|
|
|
|
delete from tt_project_info where id = #{id}
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTtProjectInfoByIds" parameterType="String">
|
|
|
|
|
delete from tt_project_info where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<select id="lastUpdateList" resultMap="TtProjectInfoResult" parameterType="string">
|
|
|
|
|
<include refid="selectTtProjectInfoVo"/>
|
2026-07-28 13:42:30 +08:00
|
|
|
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
|
2025-08-14 14:57:00 +08:00
|
|
|
</select>
|
2026-07-28 13:42:30 +08:00
|
|
|
</mapper>
|