87 lines
4.0 KiB
XML
87 lines
4.0 KiB
XML
<?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.abuwx.mapper.WbProjectMapper">
|
|
|
|
<resultMap type="WbProject" id="WbProjectResult">
|
|
<result property="id" column="id" />
|
|
<result property="projectName" column="project_name" />
|
|
<result property="projectOverview" column="project_overview" />
|
|
<result property="fileUrl" column="file_url" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
|
|
<sql id="selectWbProjectVo">
|
|
select id, project_name, project_overview, file_url, create_by, create_time, update_by, update_time, remark from wb_project
|
|
</sql>
|
|
|
|
<select id="selectWbProjectList" parameterType="WbProject" resultMap="WbProjectResult">
|
|
<include refid="selectWbProjectVo"/>
|
|
<where>
|
|
<if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
|
|
<if test="projectOverview != null and projectOverview != ''"> and project_overview = #{projectOverview}</if>
|
|
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectWbProjectById" parameterType="Long" resultMap="WbProjectResult">
|
|
<include refid="selectWbProjectVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertWbProject" parameterType="WbProject" useGeneratedKeys="true" keyProperty="id">
|
|
insert into wb_project
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="projectName != null">project_name,</if>
|
|
<if test="projectOverview != null">project_overview,</if>
|
|
<if test="fileUrl != null">file_url,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="projectName != null">#{projectName},</if>
|
|
<if test="projectOverview != null">#{projectOverview},</if>
|
|
<if test="fileUrl != null">#{fileUrl},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateWbProject" parameterType="WbProject">
|
|
update wb_project
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="projectName != null">project_name = #{projectName},</if>
|
|
<if test="projectOverview != null">project_overview = #{projectOverview},</if>
|
|
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteWbProjectById" parameterType="Long">
|
|
delete from wb_project where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteWbProjectByIds" parameterType="String">
|
|
delete from wb_project where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|