| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?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.fs.watch.mapper.WatchBeginnerGuideMapper">
- <resultMap type="WatchBeginnerGuide" id="DeviceBeginnerGGuideResult">
- <result property="id" column="id" />
- <result property="title" column="title" />
- <result property="url" column="url" />
- <result property="type" column="type" />
- <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="isDel" column="is_del" />
- <result property="belong" column="belong" />
- </resultMap>
- <sql id="selectDeviceBeginnerGGuideVo">
- select id, title, url, type, create_by, create_time, update_by, update_time, is_del,belong from watch_beginner_guide
- </sql>
- <select id="selectWatchBeginnerGuideList" parameterType="WatchBeginnerGuide" resultMap="DeviceBeginnerGGuideResult">
- <include refid="selectDeviceBeginnerGGuideVo"/> where is_del = 0
- <if test="title != null and title != ''"> and title = #{title}</if>
- <if test="url != null and url != ''"> and url = #{url}</if>
- <if test="type != null "> and type = #{type}</if>
- <if test="isDel != null "> and is_del = #{isDel}</if>
- <if test="belong != null and belong!=''"> and belong = #{belong}</if>
- </select>
- <select id="selectWatchBeginnerGuideById" parameterType="Long" resultMap="DeviceBeginnerGGuideResult">
- <include refid="selectDeviceBeginnerGGuideVo"/>
- where id = #{id}
- </select>
- <insert id="insertWatchBeginnerGuide" parameterType="WatchBeginnerGuide" useGeneratedKeys="true" keyProperty="id">
- insert into watch_beginner_guide
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="title != null">title,</if>
- <if test="url != null">url,</if>
- <if test="type != null">type,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="isDel != null">is_del,</if>
- <if test="belong != null and belong!=''">belong,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="title != null">#{title},</if>
- <if test="url != null">#{url},</if>
- <if test="type != null">#{type},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="isDel != null">#{isDel},</if>
- <if test="belong != null and belong!=''">#{belong}</if>
- </trim>
- </insert>
- <update id="updateWatchBeginnerGuide" parameterType="WatchBeginnerGuide">
- update watch_beginner_guide
- <trim prefix="SET" suffixOverrides=",">
- <if test="title != null">title = #{title},</if>
- <if test="url != null">url = #{url},</if>
- <if test="type != null">type = #{type},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="isDel != null">is_del = #{isDel},</if>
- <if test="belong != null and belong!=''">belong = #{belong},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteWatchBeginnerGuideById" parameterType="Long">
- delete from device_beginner_gGuide where id = #{id}
- </delete>
- <delete id="deleteWatchBeginnerGuideByIds" parameterType="String">
- delete from device_beginner_gGuide where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|