|
|
@@ -1,303 +1,366 @@
|
|
|
-<?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.kede.common.dao.BannerDetailsMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.kede.common.model.BannerDetails">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
- <result column="banner_url" jdbcType="VARCHAR" property="bannerUrl" />
|
|
|
- <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
- <result column="sort" jdbcType="INTEGER" property="sort" />
|
|
|
- <result column="display" jdbcType="INTEGER" property="display" />
|
|
|
- <result column="position" jdbcType="INTEGER" property="position" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Example_Where_Clause">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- <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">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- <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">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- id, banner_url, title, sort, display, position
|
|
|
- </sql>
|
|
|
- <select id="selectByExample" parameterType="com.kede.common.model.BannerDetailsExample" resultMap="BaseResultMap">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- select
|
|
|
- <if test="distinct">
|
|
|
- distinct
|
|
|
- </if>
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from banner_details
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- <if test="orderByClause != null">
|
|
|
- order by ${orderByClause}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from banner_details
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- delete from banner_details
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </delete>
|
|
|
- <delete id="deleteByExample" parameterType="com.kede.common.model.BannerDetailsExample">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- delete from banner_details
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
- <insert id="insert" parameterType="com.kede.common.model.BannerDetails">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- insert into banner_details (id, banner_url, title,
|
|
|
- sort, display, position
|
|
|
- )
|
|
|
- values (#{id,jdbcType=INTEGER}, #{bannerUrl,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
|
|
- #{sort,jdbcType=INTEGER}, #{display,jdbcType=INTEGER}, #{position,jdbcType=INTEGER}
|
|
|
- )
|
|
|
- </insert>
|
|
|
- <insert id="insertSelective" parameterType="com.kede.common.model.BannerDetails">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- insert into banner_details
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
- <if test="bannerUrl != null">
|
|
|
- banner_url,
|
|
|
- </if>
|
|
|
- <if test="title != null">
|
|
|
- title,
|
|
|
- </if>
|
|
|
- <if test="sort != null">
|
|
|
- sort,
|
|
|
- </if>
|
|
|
- <if test="display != null">
|
|
|
- display,
|
|
|
- </if>
|
|
|
- <if test="position != null">
|
|
|
- position,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="bannerUrl != null">
|
|
|
- #{bannerUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="title != null">
|
|
|
- #{title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="sort != null">
|
|
|
- #{sort,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="display != null">
|
|
|
- #{display,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="position != null">
|
|
|
- #{position,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <select id="countByExample" parameterType="com.kede.common.model.BannerDetailsExample" resultType="java.lang.Long">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- select count(*) from banner_details
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </select>
|
|
|
- <update id="updateByExampleSelective" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- update banner_details
|
|
|
- <set>
|
|
|
- <if test="record.id != null">
|
|
|
- id = #{record.id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.bannerUrl != null">
|
|
|
- banner_url = #{record.bannerUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.title != null">
|
|
|
- title = #{record.title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.sort != null">
|
|
|
- sort = #{record.sort,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.display != null">
|
|
|
- display = #{record.display,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.position != null">
|
|
|
- position = #{record.position,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
- <update id="updateByExample" parameterType="map">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- update banner_details
|
|
|
- set id = #{record.id,jdbcType=INTEGER},
|
|
|
- banner_url = #{record.bannerUrl,jdbcType=VARCHAR},
|
|
|
- title = #{record.title,jdbcType=VARCHAR},
|
|
|
- sort = #{record.sort,jdbcType=INTEGER},
|
|
|
- display = #{record.display,jdbcType=INTEGER},
|
|
|
- position = #{record.position,jdbcType=INTEGER}
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Update_By_Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="com.kede.common.model.BannerDetails">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- update banner_details
|
|
|
- <set>
|
|
|
- <if test="bannerUrl != null">
|
|
|
- banner_url = #{bannerUrl,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="title != null">
|
|
|
- title = #{title,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="sort != null">
|
|
|
- sort = #{sort,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="display != null">
|
|
|
- display = #{display,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="position != null">
|
|
|
- position = #{position,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.kede.common.model.BannerDetails">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Wed Sep 11 15:57:15 CST 2019.
|
|
|
- -->
|
|
|
- update banner_details
|
|
|
- set banner_url = #{bannerUrl,jdbcType=VARCHAR},
|
|
|
- title = #{title,jdbcType=VARCHAR},
|
|
|
- sort = #{sort,jdbcType=INTEGER},
|
|
|
- display = #{display,jdbcType=INTEGER},
|
|
|
- position = #{position,jdbcType=INTEGER}
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
+<?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.kede.common.dao.BannerDetailsMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.kede.common.model.BannerDetails">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="banner_url" jdbcType="VARCHAR" property="bannerUrl" />
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
+ <result column="sort" jdbcType="INTEGER" property="sort" />
|
|
|
+ <result column="display" jdbcType="INTEGER" property="display" />
|
|
|
+ <result column="position" jdbcType="INTEGER" property="position" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ <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">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ <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">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ id, banner_url, title, sort, display, position, create_time
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.kede.common.model.BannerDetailsExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from banner_details
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from banner_details
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ delete from banner_details
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.kede.common.model.BannerDetailsExample">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ delete from banner_details
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.kede.common.model.BannerDetails">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ insert into banner_details (id, banner_url, title,
|
|
|
+ sort, display, position,
|
|
|
+ create_time)
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{bannerUrl,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
|
|
|
+ #{sort,jdbcType=INTEGER}, #{display,jdbcType=INTEGER}, #{position,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.kede.common.model.BannerDetails">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ insert into banner_details
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="bannerUrl != null">
|
|
|
+ banner_url,
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title,
|
|
|
+ </if>
|
|
|
+ <if test="sort != null">
|
|
|
+ sort,
|
|
|
+ </if>
|
|
|
+ <if test="display != null">
|
|
|
+ display,
|
|
|
+ </if>
|
|
|
+ <if test="position != null">
|
|
|
+ position,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="bannerUrl != null">
|
|
|
+ #{bannerUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sort != null">
|
|
|
+ #{sort,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="display != null">
|
|
|
+ #{display,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="position != null">
|
|
|
+ #{position,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.kede.common.model.BannerDetailsExample" resultType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ select count(*) from banner_details
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ update banner_details
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.bannerUrl != null">
|
|
|
+ banner_url = #{record.bannerUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.title != null">
|
|
|
+ title = #{record.title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.sort != null">
|
|
|
+ sort = #{record.sort,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.display != null">
|
|
|
+ display = #{record.display,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.position != null">
|
|
|
+ position = #{record.position,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.createTime != null">
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ update banner_details
|
|
|
+ set id = #{record.id,jdbcType=INTEGER},
|
|
|
+ banner_url = #{record.bannerUrl,jdbcType=VARCHAR},
|
|
|
+ title = #{record.title,jdbcType=VARCHAR},
|
|
|
+ sort = #{record.sort,jdbcType=INTEGER},
|
|
|
+ display = #{record.display,jdbcType=INTEGER},
|
|
|
+ position = #{record.position,jdbcType=INTEGER},
|
|
|
+ create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.kede.common.model.BannerDetails">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ update banner_details
|
|
|
+ <set>
|
|
|
+ <if test="bannerUrl != null">
|
|
|
+ banner_url = #{bannerUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="title != null">
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sort != null">
|
|
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="display != null">
|
|
|
+ display = #{display,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="position != null">
|
|
|
+ position = #{position,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.kede.common.model.BannerDetails">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Dec 25 14:10:15 CST 2019.
|
|
|
+ -->
|
|
|
+ update banner_details
|
|
|
+ set banner_url = #{bannerUrl,jdbcType=VARCHAR},
|
|
|
+ title = #{title,jdbcType=VARCHAR},
|
|
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
|
+ display = #{display,jdbcType=INTEGER},
|
|
|
+ position = #{position,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectByid" parameterType="java.lang.Integer" resultType="com.kede.banners.bo.OutBannerDetails" >
|
|
|
+ select id, banner_url bannerUrl, title, sort, display, position, date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert
|
|
|
+ from banner_details where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findBannersList" resultType="com.kede.banners.bo.OutBannerDetails">
|
|
|
+ select id, banner_url bannerUrl, title, sort, display, position, date_format(create_time,'%Y-%m-%d %H:%i:%S') as createTimeConvert
|
|
|
+ from banner_details where 1=1
|
|
|
+ <if test="b.id!=null">
|
|
|
+ and id = #{b.id}
|
|
|
+ </if>
|
|
|
+ <if test="b.title!=null">
|
|
|
+ and title = #{b.title}
|
|
|
+ </if>
|
|
|
+ <if test="b.sort!=null">
|
|
|
+ and sort = #{b.sort}
|
|
|
+ </if>
|
|
|
+ <if test="b.display!=null">
|
|
|
+ and display = #{b.display}
|
|
|
+ </if>
|
|
|
+ <if test="b.position!=null">
|
|
|
+ and position = #{b.position}
|
|
|
+ </if>
|
|
|
+ order by display,sort desc,create_time desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="findBannersCount" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from banner_details where 1=1
|
|
|
+ <if test="b.id!=null">
|
|
|
+ and id = #{b.id}
|
|
|
+ </if>
|
|
|
+ <if test="b.title!=null">
|
|
|
+ and title = #{b.title}
|
|
|
+ </if>
|
|
|
+ <if test="b.sort!=null">
|
|
|
+ and sort = #{b.sort}
|
|
|
+ </if>
|
|
|
+ <if test="b.display!=null">
|
|
|
+ and display = #{b.display}
|
|
|
+ </if>
|
|
|
+ <if test="b.position!=null">
|
|
|
+ and position = #{b.position}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|