97 lines
4.6 KiB
XML
97 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.playlet.system.mapper.PlayletBannerMapper">
|
|
|
|
<resultMap type="PlayletBanner" id="PlayletBannerResult">
|
|
<result property="id" column="ID" />
|
|
<result property="name" column="NAME" />
|
|
<result property="url" column="URL" />
|
|
<result property="detailUrl" column="DETAIL_URL" />
|
|
<result property="seq" column="SEQ" />
|
|
<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" />
|
|
</resultMap>
|
|
|
|
<sql id="selectPlayletBannerVo">
|
|
select ID, NAME, URL, DETAIL_URL, SEQ, CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, REMARK from playlet_banner
|
|
</sql>
|
|
|
|
<select id="selectPlayletBannerList" parameterType="PlayletBanner" resultMap="PlayletBannerResult">
|
|
<include refid="selectPlayletBannerVo"/>
|
|
<where>
|
|
<if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
|
|
<if test="url != null and url != ''"> and URL = #{url}</if>
|
|
<if test="detailUrl != null and detailUrl != ''"> and DETAIL_URL = #{detailUrl}</if>
|
|
<if test="seq != null "> and SEQ = #{seq}</if>
|
|
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
|
<if test="createTime != null "> and CREATE_TIME = #{createTime}</if>
|
|
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
|
<if test="updateTime != null "> and UPDATE_TIME = #{updateTime}</if>
|
|
<if test="remark != null and remark != ''"> and REMARK = #{remark}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectPlayletBannerById" parameterType="Long" resultMap="PlayletBannerResult">
|
|
<include refid="selectPlayletBannerVo"/>
|
|
where ID = #{id}
|
|
</select>
|
|
|
|
<insert id="insertPlayletBanner" parameterType="PlayletBanner" useGeneratedKeys="true" keyProperty="id">
|
|
insert into playlet_banner
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">NAME,</if>
|
|
<if test="url != null">URL,</if>
|
|
<if test="detailUrl != null">DETAIL_URL,</if>
|
|
<if test="seq != null">SEQ,</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="remark != null">REMARK,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="name != null">#{name},</if>
|
|
<if test="url != null">#{url},</if>
|
|
<if test="detailUrl != null">#{detailUrl},</if>
|
|
<if test="seq != null">#{seq},</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="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updatePlayletBanner" parameterType="PlayletBanner">
|
|
update playlet_banner
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="name != null">NAME = #{name},</if>
|
|
<if test="url != null">URL = #{url},</if>
|
|
<if test="detailUrl != null">DETAIL_URL = #{detailUrl},</if>
|
|
<if test="seq != null">SEQ = #{seq},</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="remark != null">REMARK = #{remark},</if>
|
|
</trim>
|
|
where ID = #{id}
|
|
</update>
|
|
|
|
<delete id="deletePlayletBannerById" parameterType="Long">
|
|
delete from playlet_banner where ID = #{id}
|
|
</delete>
|
|
|
|
<delete id="deletePlayletBannerByIds" parameterType="String">
|
|
delete from playlet_banner where ID in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |