<?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.tr.slideshowPic.mapper.SlideshowPicMapper">
|
|
<resultMap type="SlideshowPic" id="SlideshowPicResult">
|
<result property="slideshowPicId" column="slideshow_pic_id" />
|
<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" />
|
<result property="slideshowDescribe" column="slideshow_describe" />
|
<result property="picUrl" column="pic_url" />
|
</resultMap>
|
|
<sql id="selectSlideshowPicVo">
|
select slideshow_pic_id, create_by, create_time, update_by, update_time, remark, slideshow_describe, pic_url from tr_slideshow_pic
|
</sql>
|
|
<select id="selectSlideshowPicList" parameterType="SlideshowPic" resultMap="SlideshowPicResult">
|
<include refid="selectSlideshowPicVo"/>
|
<where>
|
<if test="slideshowDescribe != null and slideshowDescribe != ''"> and slideshow_describe like concat('%', #{slideshowDescribe}, '%')</if>
|
<if test="picUrl != null and picUrl != ''"> and pic_url = #{picUrl}</if>
|
</where>
|
</select>
|
|
<select id="selectSlideshowPicById" parameterType="Long" resultMap="SlideshowPicResult">
|
<include refid="selectSlideshowPicVo"/>
|
where slideshow_pic_id = #{slideshowPicId}
|
</select>
|
|
<insert id="insertSlideshowPic" parameterType="SlideshowPic" useGeneratedKeys="true" keyProperty="slideshowPicId">
|
insert into tr_slideshow_pic
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createTime != null ">create_time,</if>
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
<if test="updateTime != null ">update_time,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
<if test="slideshowDescribe != null and slideshowDescribe != ''">slideshow_describe,</if>
|
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createTime != null ">#{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
<if test="updateTime != null ">#{updateTime},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="slideshowDescribe != null and slideshowDescribe != ''">#{slideshowDescribe},</if>
|
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
</trim>
|
</insert>
|
|
<update id="updateSlideshowPic" parameterType="SlideshowPic">
|
update tr_slideshow_pic
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createTime != null ">create_time = #{createTime},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
<if test="slideshowDescribe != null and slideshowDescribe != ''">slideshow_describe = #{slideshowDescribe},</if>
|
<if test="picUrl != null and picUrl != ''">pic_url = #{picUrl},</if>
|
</trim>
|
where slideshow_pic_id = #{slideshowPicId}
|
</update>
|
|
<delete id="deleteSlideshowPicById" parameterType="Long">
|
delete from tr_slideshow_pic where slideshow_pic_id = #{slideshowPicId}
|
</delete>
|
|
<delete id="deleteSlideshowPicByIds" parameterType="String">
|
delete from tr_slideshow_pic where slideshow_pic_id in
|
<foreach item="slideshowPicId" collection="array" open="(" separator="," close=")">
|
#{slideshowPicId}
|
</foreach>
|
</delete>
|
|
</mapper>
|