提交 78d48c68 编写于 作者: F fengyw

轮播功能

上级 14f27fdd
<?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.roncoo.education.system.dao.impl.mapper.WebsiteAdvMapper">
<resultMap id="BaseResultMap" type="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdv">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
<result column="status_id" jdbcType="TINYINT" property="statusId" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="adv_title" jdbcType="VARCHAR" property="advTitle" />
<result column="adv_img" jdbcType="VARCHAR" property="advImg" />
<result column="adv_url" jdbcType="VARCHAR" property="advUrl" />
<result column="adv_target" jdbcType="VARCHAR" property="advTarget" />
<result column="adv_location" jdbcType="TINYINT" property="advLocation" />
<result column="begin_time" jdbcType="TIMESTAMP" property="beginTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
<result column="plat_show" jdbcType="TINYINT" property="platShow" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, gmt_create, gmt_modified, status_id, sort, adv_title, adv_img, adv_url, adv_target,
adv_location, begin_time, end_time, plat_show
</sql>
<select id="selectByExample" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdvExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from website_adv
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limitStart >= 0">
limit ${limitStart} , ${pageSize}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from website_adv
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from website_adv
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdvExample">
delete from website_adv
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdv">
insert into website_adv (id, gmt_create, gmt_modified,
status_id, sort, adv_title,
adv_img, adv_url, adv_target,
adv_location, begin_time, end_time,
plat_show)
values (#{id,jdbcType=BIGINT}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP},
#{statusId,jdbcType=TINYINT}, #{sort,jdbcType=INTEGER}, #{advTitle,jdbcType=VARCHAR},
#{advImg,jdbcType=VARCHAR}, #{advUrl,jdbcType=VARCHAR}, #{advTarget,jdbcType=VARCHAR},
#{advLocation,jdbcType=TINYINT}, #{beginTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP},
#{platShow,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdv">
insert into website_adv
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
<if test="gmtModified != null">
gmt_modified,
</if>
<if test="statusId != null">
status_id,
</if>
<if test="sort != null">
sort,
</if>
<if test="advTitle != null">
adv_title,
</if>
<if test="advImg != null">
adv_img,
</if>
<if test="advUrl != null">
adv_url,
</if>
<if test="advTarget != null">
adv_target,
</if>
<if test="advLocation != null">
adv_location,
</if>
<if test="beginTime != null">
begin_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="platShow != null">
plat_show,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="gmtModified != null">
#{gmtModified,jdbcType=TIMESTAMP},
</if>
<if test="statusId != null">
#{statusId,jdbcType=TINYINT},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="advTitle != null">
#{advTitle,jdbcType=VARCHAR},
</if>
<if test="advImg != null">
#{advImg,jdbcType=VARCHAR},
</if>
<if test="advUrl != null">
#{advUrl,jdbcType=VARCHAR},
</if>
<if test="advTarget != null">
#{advTarget,jdbcType=VARCHAR},
</if>
<if test="advLocation != null">
#{advLocation,jdbcType=TINYINT},
</if>
<if test="beginTime != null">
#{beginTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
#{endTime,jdbcType=TIMESTAMP},
</if>
<if test="platShow != null">
#{platShow,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdvExample" resultType="java.lang.Integer">
select count(*) from website_adv
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update website_adv
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.gmtCreate != null">
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="record.gmtModified != null">
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
</if>
<if test="record.statusId != null">
status_id = #{record.statusId,jdbcType=TINYINT},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.advTitle != null">
adv_title = #{record.advTitle,jdbcType=VARCHAR},
</if>
<if test="record.advImg != null">
adv_img = #{record.advImg,jdbcType=VARCHAR},
</if>
<if test="record.advUrl != null">
adv_url = #{record.advUrl,jdbcType=VARCHAR},
</if>
<if test="record.advTarget != null">
adv_target = #{record.advTarget,jdbcType=VARCHAR},
</if>
<if test="record.advLocation != null">
adv_location = #{record.advLocation,jdbcType=TINYINT},
</if>
<if test="record.beginTime != null">
begin_time = #{record.beginTime,jdbcType=TIMESTAMP},
</if>
<if test="record.endTime != null">
end_time = #{record.endTime,jdbcType=TIMESTAMP},
</if>
<if test="record.platShow != null">
plat_show = #{record.platShow,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update website_adv
set id = #{record.id,jdbcType=BIGINT},
gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{record.gmtModified,jdbcType=TIMESTAMP},
status_id = #{record.statusId,jdbcType=TINYINT},
sort = #{record.sort,jdbcType=INTEGER},
adv_title = #{record.advTitle,jdbcType=VARCHAR},
adv_img = #{record.advImg,jdbcType=VARCHAR},
adv_url = #{record.advUrl,jdbcType=VARCHAR},
adv_target = #{record.advTarget,jdbcType=VARCHAR},
adv_location = #{record.advLocation,jdbcType=TINYINT},
begin_time = #{record.beginTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,jdbcType=TIMESTAMP},
plat_show = #{record.platShow,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdv">
update website_adv
<set>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
<if test="gmtModified != null">
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
</if>
<if test="statusId != null">
status_id = #{statusId,jdbcType=TINYINT},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="advTitle != null">
adv_title = #{advTitle,jdbcType=VARCHAR},
</if>
<if test="advImg != null">
adv_img = #{advImg,jdbcType=VARCHAR},
</if>
<if test="advUrl != null">
adv_url = #{advUrl,jdbcType=VARCHAR},
</if>
<if test="advTarget != null">
adv_target = #{advTarget,jdbcType=VARCHAR},
</if>
<if test="advLocation != null">
adv_location = #{advLocation,jdbcType=TINYINT},
</if>
<if test="beginTime != null">
begin_time = #{beginTime,jdbcType=TIMESTAMP},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=TIMESTAMP},
</if>
<if test="platShow != null">
plat_show = #{platShow,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.roncoo.education.system.dao.impl.mapper.entity.WebsiteAdv">
update website_adv
set gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
status_id = #{statusId,jdbcType=TINYINT},
sort = #{sort,jdbcType=INTEGER},
adv_title = #{advTitle,jdbcType=VARCHAR},
adv_img = #{advImg,jdbcType=VARCHAR},
adv_url = #{advUrl,jdbcType=VARCHAR},
adv_target = #{advTarget,jdbcType=VARCHAR},
adv_location = #{advLocation,jdbcType=TINYINT},
begin_time = #{beginTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP},
plat_show = #{platShow,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册