66 lines
2.8 KiB
XML
66 lines
2.8 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.CmsGuiderInfoMapper">
|
|
|
|
<resultMap type="CmsGuiderInfo" id="CmsGuiderInfoResult">
|
|
<result property="id" column="id" />
|
|
<result property="guiderName" column="guider_name" />
|
|
<result property="guiderIntro" column="guider_intro" />
|
|
<result property="guiderImg" column="guider_img" />
|
|
</resultMap>
|
|
|
|
<sql id="selectCmsGuiderInfoVo">
|
|
select id, guider_name, guider_intro, guider_img from cms_guider_info
|
|
</sql>
|
|
|
|
<select id="selectCmsGuiderInfoList" parameterType="CmsGuiderInfo" resultMap="CmsGuiderInfoResult">
|
|
<include refid="selectCmsGuiderInfoVo"/>
|
|
<where>
|
|
<if test="guiderName != null and guiderName != ''"> and guider_name like concat('%', #{guiderName}, '%')</if>
|
|
<if test="guiderIntro != null and guiderIntro != ''"> and guider_intro = #{guiderIntro}</if>
|
|
<if test="guiderImg != null and guiderImg != ''"> and guider_img = #{guiderImg}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectCmsGuiderInfoById" parameterType="Long" resultMap="CmsGuiderInfoResult">
|
|
<include refid="selectCmsGuiderInfoVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertCmsGuiderInfo" parameterType="CmsGuiderInfo" useGeneratedKeys="true" keyProperty="id">
|
|
insert into cms_guider_info
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="guiderName != null">guider_name,</if>
|
|
<if test="guiderIntro != null">guider_intro,</if>
|
|
<if test="guiderImg != null">guider_img,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="guiderName != null">#{guiderName},</if>
|
|
<if test="guiderIntro != null">#{guiderIntro},</if>
|
|
<if test="guiderImg != null">#{guiderImg},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateCmsGuiderInfo" parameterType="CmsGuiderInfo">
|
|
update cms_guider_info
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="guiderName != null">guider_name = #{guiderName},</if>
|
|
<if test="guiderIntro != null">guider_intro = #{guiderIntro},</if>
|
|
<if test="guiderImg != null">guider_img = #{guiderImg},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteCmsGuiderInfoById" parameterType="Long">
|
|
delete from cms_guider_info where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteCmsGuiderInfoByIds" parameterType="String">
|
|
delete from cms_guider_info where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |