init
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
<?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" />
|
||||
</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
|
||||
</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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTtProjectInfoById" parameterType="Integer" resultMap="TtProjectInfoResult">
|
||||
<include refid="selectTtProjectInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectTtProjectInfoByName" parameterType="String" resultMap="TtProjectInfoResult">
|
||||
<include refid="selectTtProjectInfoVo"/>
|
||||
where project_name1 = #{codeName}
|
||||
</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"/>
|
||||
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
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user