123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648 |
- <?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.book.server.dao.mapper.BookshelfRecommandMapper">
- <resultMap id="BaseResultMap" type="com.book.server.dao.entity.BookshelfRecommand">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="book_id" jdbcType="BIGINT" property="bookId" />
- <result column="book_name" jdbcType="VARCHAR" property="bookName" />
- <result column="sex" jdbcType="CHAR" property="sex" />
- <result column="status" jdbcType="CHAR" property="status" />
- <result column="createtime" jdbcType="INTEGER" property="createtime" />
- <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
- </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 Fri Aug 20 19:52:17 CST 2021.
- -->
- <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 Fri Aug 20 19:52:17 CST 2021.
- -->
- <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 Fri Aug 20 19:52:17 CST 2021.
- -->
- id, book_id, book_name, sex, status, createtime, updatetime
- </sql>
- <select id="selectByExample" parameterType="com.book.server.dao.entity.example.BookshelfRecommandExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from bookshelf_recommand
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- <if test="rows != null">
- <if test="offset != null">
- limit ${offset}, ${rows}
- </if>
- <if test="offset == null">
- limit ${rows}
- </if>
- </if>
- </select>
- <select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- select
- <if test="example != null and example.distinct">
- distinct
- </if>
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach collection="selective" item="column" separator=",">
- ${column.aliasedEscapedColumnName}
- </foreach>
- </when>
- <otherwise>
- <include refid="Base_Column_List" />
- </otherwise>
- </choose>
- from bookshelf_recommand
- <if test="example != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- <if test="example != null and example.orderByClause != null">
- order by ${example.orderByClause}
- </if>
- <if test="example != null and example.rows != null">
- <if test="example.offset != null">
- limit ${example.offset}, ${example.rows}
- </if>
- <if test="example.offset == null">
- limit ${example.rows}
- </if>
- </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 Fri Aug 20 19:52:17 CST 2021.
- -->
- select
- <include refid="Base_Column_List" />
- from bookshelf_recommand
- where id = #{id,jdbcType=INTEGER}
- </select>
- <select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- select
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach collection="selective" item="column" separator=",">
- ${column.aliasedEscapedColumnName}
- </foreach>
- </when>
- <otherwise>
- <include refid="Base_Column_List" />
- </otherwise>
- </choose>
- from bookshelf_recommand
- 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 Fri Aug 20 19:52:17 CST 2021.
- -->
- delete from bookshelf_recommand
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.book.server.dao.entity.example.BookshelfRecommandExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- delete from bookshelf_recommand
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.book.server.dao.entity.BookshelfRecommand">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- insert into bookshelf_recommand (id, book_id, book_name,
- sex, status, createtime,
- updatetime)
- values (#{id,jdbcType=INTEGER}, #{bookId,jdbcType=BIGINT}, #{bookName,jdbcType=VARCHAR},
- #{sex,jdbcType=CHAR}, #{status,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER},
- #{updatetime,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- insert into bookshelf_recommand
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach close=")" collection="selective" item="column" open="(" separator=",">
- ${column.escapedColumnName}
- </foreach>
- </when>
- <otherwise>
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="record.id != null">
- id,
- </if>
- <if test="record.bookId != null">
- book_id,
- </if>
- <if test="record.bookName != null">
- book_name,
- </if>
- <if test="record.sex != null">
- sex,
- </if>
- <if test="record.status != null">
- status,
- </if>
- <if test="record.createtime != null">
- createtime,
- </if>
- <if test="record.updatetime != null">
- updatetime,
- </if>
- </trim>
- <trim prefix="(" suffix=")" suffixOverrides="," />
- </otherwise>
- </choose>
- values
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach close=")" collection="selective" item="column" open="(" separator=",">
- #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
- </foreach>
- </when>
- <otherwise>
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="record.id != null">
- #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.bookId != null">
- #{record.bookId,jdbcType=BIGINT},
- </if>
- <if test="record.bookName != null">
- #{record.bookName,jdbcType=VARCHAR},
- </if>
- <if test="record.sex != null">
- #{record.sex,jdbcType=CHAR},
- </if>
- <if test="record.status != null">
- #{record.status,jdbcType=CHAR},
- </if>
- <if test="record.createtime != null">
- #{record.createtime,jdbcType=INTEGER},
- </if>
- <if test="record.updatetime != null">
- #{record.updatetime,jdbcType=INTEGER},
- </if>
- </trim>
- </otherwise>
- </choose>
- </insert>
- <select id="countByExample" parameterType="com.book.server.dao.entity.example.BookshelfRecommandExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- select count(*) from bookshelf_recommand
- <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 Fri Aug 20 19:52:17 CST 2021.
- -->
- update bookshelf_recommand
- SET
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach collection="selective" item="column" separator=",">
- ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
- </foreach>
- </when>
- <otherwise>
- <trim suffixOverrides=",">
- <if test="record.id != null">
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.bookId != null">
- book_id = #{record.bookId,jdbcType=BIGINT},
- </if>
- <if test="record.bookName != null">
- book_name = #{record.bookName,jdbcType=VARCHAR},
- </if>
- <if test="record.sex != null">
- sex = #{record.sex,jdbcType=CHAR},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=CHAR},
- </if>
- <if test="record.createtime != null">
- createtime = #{record.createtime,jdbcType=INTEGER},
- </if>
- <if test="record.updatetime != null">
- updatetime = #{record.updatetime,jdbcType=INTEGER},
- </if>
- </trim>
- </otherwise>
- </choose>
- <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 Fri Aug 20 19:52:17 CST 2021.
- -->
- update bookshelf_recommand
- set id = #{record.id,jdbcType=INTEGER},
- book_id = #{record.bookId,jdbcType=BIGINT},
- book_name = #{record.bookName,jdbcType=VARCHAR},
- sex = #{record.sex,jdbcType=CHAR},
- status = #{record.status,jdbcType=CHAR},
- createtime = #{record.createtime,jdbcType=INTEGER},
- updatetime = #{record.updatetime,jdbcType=INTEGER}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- update bookshelf_recommand
- SET
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach collection="selective" item="column" separator=",">
- ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
- </foreach>
- </when>
- <otherwise>
- <trim suffixOverrides=",">
- <if test="record.bookId != null">
- book_id = #{record.bookId,jdbcType=BIGINT},
- </if>
- <if test="record.bookName != null">
- book_name = #{record.bookName,jdbcType=VARCHAR},
- </if>
- <if test="record.sex != null">
- sex = #{record.sex,jdbcType=CHAR},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=CHAR},
- </if>
- <if test="record.createtime != null">
- createtime = #{record.createtime,jdbcType=INTEGER},
- </if>
- <if test="record.updatetime != null">
- updatetime = #{record.updatetime,jdbcType=INTEGER},
- </if>
- </trim>
- </otherwise>
- </choose>
- where id = #{record.id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.book.server.dao.entity.BookshelfRecommand">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- update bookshelf_recommand
- set book_id = #{bookId,jdbcType=BIGINT},
- book_name = #{bookName,jdbcType=VARCHAR},
- sex = #{sex,jdbcType=CHAR},
- status = #{status,jdbcType=CHAR},
- createtime = #{createtime,jdbcType=INTEGER},
- updatetime = #{updatetime,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <select id="selectOneByExample" parameterType="com.book.server.dao.entity.example.BookshelfRecommandExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- select
- <include refid="Base_Column_List" />
- from bookshelf_recommand
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- limit 1
- </select>
- <select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- select
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach collection="selective" item="column" separator=",">
- ${column.aliasedEscapedColumnName}
- </foreach>
- </when>
- <otherwise>
- <include refid="Base_Column_List" />
- </otherwise>
- </choose>
- from bookshelf_recommand
- <if test="example != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- <if test="example != null and example.orderByClause != null">
- order by ${example.orderByClause}
- </if>
- limit 1
- </select>
- <insert id="batchInsert" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- insert into bookshelf_recommand
- (id, book_id, book_name, sex, status, createtime, updatetime)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.id,jdbcType=INTEGER}, #{item.bookId,jdbcType=BIGINT}, #{item.bookName,jdbcType=VARCHAR},
- #{item.sex,jdbcType=CHAR}, #{item.status,jdbcType=CHAR}, #{item.createtime,jdbcType=INTEGER},
- #{item.updatetime,jdbcType=INTEGER})
- </foreach>
- </insert>
- <insert id="batchInsertSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- insert into bookshelf_recommand (
- <foreach collection="selective" item="column" separator=",">
- ${column.escapedColumnName}
- </foreach>
- )
- values
- <foreach collection="list" item="item" separator=",">
- (
- <foreach collection="selective" item="column" separator=",">
- <if test="'id'.toString() == column.value">
- #{item.id,jdbcType=INTEGER}
- </if>
- <if test="'book_id'.toString() == column.value">
- #{item.bookId,jdbcType=BIGINT}
- </if>
- <if test="'book_name'.toString() == column.value">
- #{item.bookName,jdbcType=VARCHAR}
- </if>
- <if test="'sex'.toString() == column.value">
- #{item.sex,jdbcType=CHAR}
- </if>
- <if test="'status'.toString() == column.value">
- #{item.status,jdbcType=CHAR}
- </if>
- <if test="'createtime'.toString() == column.value">
- #{item.createtime,jdbcType=INTEGER}
- </if>
- <if test="'updatetime'.toString() == column.value">
- #{item.updatetime,jdbcType=INTEGER}
- </if>
- </foreach>
- )
- </foreach>
- </insert>
- <insert id="upsertSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- insert into bookshelf_recommand
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach close=")" collection="selective" item="column" open="(" separator=",">
- ${column.escapedColumnName}
- </foreach>
- </when>
- <otherwise>
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="record.id != null">
- id,
- </if>
- <if test="record.bookId != null">
- book_id,
- </if>
- <if test="record.bookName != null">
- book_name,
- </if>
- <if test="record.sex != null">
- sex,
- </if>
- <if test="record.status != null">
- status,
- </if>
- <if test="record.createtime != null">
- createtime,
- </if>
- <if test="record.updatetime != null">
- updatetime,
- </if>
- </trim>
- <trim prefix="(" suffix=")" suffixOverrides="," />
- </otherwise>
- </choose>
- values
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach close=")" collection="selective" item="column" open="(" separator=",">
- #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
- </foreach>
- </when>
- <otherwise>
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="record.id != null">
- #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.bookId != null">
- #{record.bookId,jdbcType=BIGINT},
- </if>
- <if test="record.bookName != null">
- #{record.bookName,jdbcType=VARCHAR},
- </if>
- <if test="record.sex != null">
- #{record.sex,jdbcType=CHAR},
- </if>
- <if test="record.status != null">
- #{record.status,jdbcType=CHAR},
- </if>
- <if test="record.createtime != null">
- #{record.createtime,jdbcType=INTEGER},
- </if>
- <if test="record.updatetime != null">
- #{record.updatetime,jdbcType=INTEGER},
- </if>
- </trim>
- </otherwise>
- </choose>
- on duplicate key update
- <choose>
- <when test="selective != null and selective.length > 0">
- <foreach collection="selective" item="column" separator=",">
- ${column.escapedColumnName} = #{record.${column.javaProperty},jdbcType=${column.jdbcType}}
- </foreach>
- </when>
- <otherwise>
- <trim suffixOverrides=",">
- <if test="record.id != null">
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.bookId != null">
- book_id = #{record.bookId,jdbcType=BIGINT},
- </if>
- <if test="record.bookName != null">
- book_name = #{record.bookName,jdbcType=VARCHAR},
- </if>
- <if test="record.sex != null">
- sex = #{record.sex,jdbcType=CHAR},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=CHAR},
- </if>
- <if test="record.createtime != null">
- createtime = #{record.createtime,jdbcType=INTEGER},
- </if>
- <if test="record.updatetime != null">
- updatetime = #{record.updatetime,jdbcType=INTEGER},
- </if>
- </trim>
- </otherwise>
- </choose>
- </insert>
- <insert id="upsert" parameterType="com.book.server.dao.entity.BookshelfRecommand">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Fri Aug 20 19:52:17 CST 2021.
- -->
- insert into bookshelf_recommand
- (id, book_id, book_name, sex, status, createtime, updatetime)
- values
- (#{id,jdbcType=INTEGER}, #{bookId,jdbcType=BIGINT}, #{bookName,jdbcType=VARCHAR},
- #{sex,jdbcType=CHAR}, #{status,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER},
- #{updatetime,jdbcType=INTEGER})
- on duplicate key update
- id = #{id,jdbcType=INTEGER},
- book_id = #{bookId,jdbcType=BIGINT},
- book_name = #{bookName,jdbcType=VARCHAR},
- sex = #{sex,jdbcType=CHAR},
- status = #{status,jdbcType=CHAR},
- createtime = #{createtime,jdbcType=INTEGER},
- updatetime = #{updatetime,jdbcType=INTEGER}
- </insert>
- </mapper>
|