123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?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.project.VRdemo.mapper.ArchivesUnboundMapper">
-
- <resultMap type="ArchivesUnbound" id="ArchivesUnboundResult">
- <result property="id" column="id" />
- <result property="englishName" column="english_name" />
- <result property="chineseName" column="chinese_name" />
- <result property="introduce" column="introduce" />
- <result property="link" column="link" />
- <result property="createTime" column="create_time" />
- <result property="createBy" column="create_by" />
- <result property="updateTime" column="update_time" />
- <result property="updateBy" column="update_by" />
- </resultMap>
- <sql id="selectArchivesUnboundVo">
- select id, english_name, chinese_name, introduce, link, create_time, create_by, update_time, update_by from vr_archives_unbound
- </sql>
- <select id="selectArchivesUnboundList" parameterType="ArchivesUnbound" resultMap="ArchivesUnboundResult">
- <include refid="selectArchivesUnboundVo"/>
- <where>
- <if test="englishName != null and englishName != ''"> and english_name like concat('%', #{englishName}, '%')</if>
- <if test="chineseName != null and chineseName != ''"> and chinese_name like concat('%', #{chineseName}, '%')</if>
- <if test="introduce != null and introduce != ''"> and introduce = #{introduce}</if>
- <if test="link != null and link != ''"> and link = #{link}</if>
- </where>
- </select>
-
- <select id="selectArchivesUnboundById" parameterType="Long" resultMap="ArchivesUnboundResult">
- <include refid="selectArchivesUnboundVo"/>
- where id = #{id}
- </select>
- <select id="selectArchivesUnboundByTitle" parameterType="Long" resultMap="ArchivesUnboundResult">
- <include refid="selectArchivesUnboundVo"/>
- where title = #{title}
- </select>
-
- <insert id="insertArchivesUnbound" parameterType="ArchivesUnbound" useGeneratedKeys="true" keyProperty="id">
- insert into vr_archives_unbound
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="englishName != null">english_name,</if>
- <if test="chineseName != null">chinese_name,</if>
- <if test="introduce != null">introduce,</if>
- <if test="link != null">link,</if>
- <if test="createTime != null">create_time,</if>
- <if test="createBy != null">create_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="updateBy != null">update_by,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="englishName != null">#{englishName},</if>
- <if test="chineseName != null">#{chineseName},</if>
- <if test="introduce != null">#{introduce},</if>
- <if test="link != null">#{link},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- </trim>
- </insert>
- <insert id="insertArchivesUnboundDataList" parameterType="java.util.List">
- insert into vr_archives_unbound(english_name, chinese_name, introduce, link, create_time, create_by)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.englishName}, #{item.chineseName}, #{item.introduce}, #{item.link}, #{item.createTime}, #{item.createBy})
- </foreach>
- </insert>
- <update id="updateArchivesUnbound" parameterType="ArchivesUnbound">
- update vr_archives_unbound
- <trim prefix="SET" suffixOverrides=",">
- <if test="englishName != null">english_name = #{englishName},</if>
- <if test="chineseName != null">chinese_name = #{chineseName},</if>
- <if test="introduce != null">introduce = #{introduce},</if>
- <if test="link != null">link = #{link},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteArchivesUnboundById" parameterType="Long">
- delete from vr_archives_unbound where id = #{id}
- </delete>
- <delete id="deleteArchivesUnboundByIds" parameterType="String">
- delete from vr_archives_unbound where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|