|
@@ -0,0 +1,102 @@
|
|
|
+<?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.system.mapper.BomanAnnexMapper">
|
|
|
+
|
|
|
+ <resultMap type="BomanAnnex" id="BomanAnnexResult">
|
|
|
+ <result property="annexId" column="annex_id" />
|
|
|
+ <result property="annexUrl" column="annex_url" />
|
|
|
+ <result property="annexName" column="annex_name" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="keywords" column="keywords" />
|
|
|
+ <result property="dimension" column="dimension" />
|
|
|
+ <result property="releaseTime" column="release_time" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectBomanAnnexVo">
|
|
|
+ select annex_id, annex_url, annex_name, type,dimension, keywords, release_time, create_time, create_by, update_by, update_time from boman_annex
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectBomanAnnexList" parameterType="BomanAnnex" resultMap="BomanAnnexResult">
|
|
|
+ <include refid="selectBomanAnnexVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="annexUrl != null and annexUrl != ''"> and annex_url = #{annexUrl}</if>
|
|
|
+ <if test="annexName != null and annexName != ''"> and annex_name like concat('%', #{annexName}, '%')</if>
|
|
|
+ <if test="type != null and type != ''"> and type = #{type}</if>
|
|
|
+ <if test="keywords != null and keywords != ''"> and keywords = #{keywords}</if>
|
|
|
+ <if test="releaseTime != null "> and release_time = #{releaseTime}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectBomanAnnexByAnnexId" parameterType="Long" resultMap="BomanAnnexResult">
|
|
|
+ <include refid="selectBomanAnnexVo"/>
|
|
|
+ where annex_id = #{annexId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertBomanAnnex" parameterType="BomanAnnex" useGeneratedKeys="true" keyProperty="annexId">
|
|
|
+ insert into boman_annex
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="annexUrl != null and annexUrl != ''">annex_url,</if>
|
|
|
+ <if test="annexName != null and annexName != ''">annex_name,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="dimension != null ">dimension,</if>
|
|
|
+ <if test="keywords != null and keywords != ''">keywords,</if>
|
|
|
+ <if test="releaseTime != null">release_time,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="annexUrl != null and annexUrl != ''">#{annexUrl},</if>
|
|
|
+ <if test="annexName != null ">#{annexName},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="dimension != null and dimension != ''">#{dimension},</if>
|
|
|
+ <if test="keywords != null and keywords != ''">#{keywords},</if>
|
|
|
+ <if test="releaseTime != null">#{releaseTime},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="batchBomanAnnex">
|
|
|
+ insert into boman_annex(annex_url, annex_name,keywords,dimension,type,create_time) values
|
|
|
+ <foreach item="item" index="index" collection="list" separator=",">
|
|
|
+ (#{item.annexUrl},#{item.annexName},#{item.keywords},#{item.dimension},#{item.type},sysdate())
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+ <update id="updateBomanAnnex" parameterType="BomanAnnex">
|
|
|
+ update boman_annex
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="annexUrl != null and annexUrl != ''">annex_url = #{annexUrl},</if>
|
|
|
+ <if test="annexName != null and annexName != ''">annex_name = #{annexName},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="dimension != null ">dimension = #{dimension},</if>
|
|
|
+ <if test="keywords != null and keywords != ''">keywords = #{keywords},</if>
|
|
|
+ <if test="releaseTime != null">release_time = #{releaseTime},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where annex_id = #{annexId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteBomanAnnexByAnnexId" parameterType="Long">
|
|
|
+ delete from boman_annex where annex_id = #{annexId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteBomanAnnexByAnnexIds" parameterType="String">
|
|
|
+ delete from boman_annex where annex_id in
|
|
|
+ <foreach item="annexId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{annexId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|