96 lines
4.6 KiB
XML
96 lines
4.6 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.system.mapper.CmsAudioGuideMapper">
|
||
|
|
||
|
<resultMap type="CmsAudioGuide" id="CmsAudioGuideResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="title" column="title" />
|
||
|
<result property="content" column="content" />
|
||
|
<result property="coverImg" column="cover_img" />
|
||
|
<result property="fileUrl" column="file_url" />
|
||
|
<result property="sort" column="sort" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="remark" column="remark" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectCmsAudioGuideVo">
|
||
|
select id, title, content, cover_img, file_url, sort, create_time, create_by, update_time, update_by, remark from cms_audio_guide
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectCmsAudioGuideList" parameterType="CmsAudioGuide" resultMap="CmsAudioGuideResult">
|
||
|
<include refid="selectCmsAudioGuideVo"/>
|
||
|
<where>
|
||
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||
|
<if test="coverImg != null and coverImg != ''"> and cover_img = #{coverImg}</if>
|
||
|
<if test="fileUrl != null and fileUrl != ''"> and file_url = #{fileUrl}</if>
|
||
|
<if test="sort != null "> and sort = #{sort}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectCmsAudioGuideById" parameterType="Long" resultMap="CmsAudioGuideResult">
|
||
|
<include refid="selectCmsAudioGuideVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertCmsAudioGuide" parameterType="CmsAudioGuide" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into cms_audio_guide
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="title != null">title,</if>
|
||
|
<if test="content != null">content,</if>
|
||
|
<if test="coverImg != null">cover_img,</if>
|
||
|
<if test="fileUrl != null">file_url,</if>
|
||
|
<if test="sort != null">sort,</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>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="title != null">#{title},</if>
|
||
|
<if test="content != null">#{content},</if>
|
||
|
<if test="coverImg != null">#{coverImg},</if>
|
||
|
<if test="fileUrl != null">#{fileUrl},</if>
|
||
|
<if test="sort != null">#{sort},</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>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateCmsAudioGuide" parameterType="CmsAudioGuide">
|
||
|
update cms_audio_guide
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="title != null">title = #{title},</if>
|
||
|
<if test="content != null">content = #{content},</if>
|
||
|
<if test="coverImg != null">cover_img = #{coverImg},</if>
|
||
|
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||
|
<if test="sort != null">sort = #{sort},</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>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteCmsAudioGuideById" parameterType="Long">
|
||
|
delete from cms_audio_guide where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteCmsAudioGuideByIds" parameterType="String">
|
||
|
delete from cms_audio_guide where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|