123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443 |
- <?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.js.kbt.mapper.UserMapper">
- <resultMap id="BaseResultMap" type="com.js.kbt.model.User">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
- <result column="avatar" jdbcType="VARCHAR" property="avatar" />
- <result column="nickname" jdbcType="VARCHAR" property="nickname" />
- <result column="token" jdbcType="VARCHAR" property="token" />
- <result column="money" jdbcType="INTEGER" property="money" />
- <result column="indate" jdbcType="TIMESTAMP" property="indate" />
- <result column="device_id" jdbcType="VARCHAR" property="deviceId" />
- <result column="address" jdbcType="VARCHAR" property="address" />
- <result column="income" jdbcType="INTEGER" property="income" />
- <result column="car_no" jdbcType="VARCHAR" property="carNo" />
- <result column="com_id" jdbcType="INTEGER" property="comId" />
- <result column="count" jdbcType="VARCHAR" property="count" />
- <result column="qr_code" jdbcType="VARCHAR" property="qrCode" />
- <result column="is_owner" jdbcType="INTEGER" property="isOwner" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- <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 - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- <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 - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- id, mobile, avatar, nickname, token, money, indate, device_id, address, income, car_no,
- com_id, count, qr_code, is_owner
- </sql>
- <select id="selectByExample" parameterType="com.js.kbt.model.UserExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from user
- <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 - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- select
- <include refid="Base_Column_List" />
- from user
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- delete from user
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.js.kbt.model.UserExample">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- delete from user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.js.kbt.model.User">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into user (mobile, avatar, nickname,
- token, money, indate,
- device_id, address, income,
- car_no, com_id, count,
- qr_code, is_owner)
- values (#{mobile,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR},
- #{token,jdbcType=VARCHAR}, #{money,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP},
- #{deviceId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{income,jdbcType=INTEGER},
- #{carNo,jdbcType=VARCHAR}, #{comId,jdbcType=INTEGER}, #{count,jdbcType=VARCHAR},
- #{qrCode,jdbcType=VARCHAR}, #{isOwner,jdbcType=INTEGER})
- </insert>
- <insert id="insertSelective" parameterType="com.js.kbt.model.User">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="mobile != null">
- mobile,
- </if>
- <if test="avatar != null">
- avatar,
- </if>
- <if test="nickname != null">
- nickname,
- </if>
- <if test="token != null">
- token,
- </if>
- <if test="money != null">
- money,
- </if>
- <if test="indate != null">
- indate,
- </if>
- <if test="deviceId != null">
- device_id,
- </if>
- <if test="address != null">
- address,
- </if>
- <if test="income != null">
- income,
- </if>
- <if test="carNo != null">
- car_no,
- </if>
- <if test="comId != null">
- com_id,
- </if>
- <if test="count != null">
- count,
- </if>
- <if test="qrCode != null">
- qr_code,
- </if>
- <if test="isOwner != null">
- is_owner,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="mobile != null">
- #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="avatar != null">
- #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="nickname != null">
- #{nickname,jdbcType=VARCHAR},
- </if>
- <if test="token != null">
- #{token,jdbcType=VARCHAR},
- </if>
- <if test="money != null">
- #{money,jdbcType=INTEGER},
- </if>
- <if test="indate != null">
- #{indate,jdbcType=TIMESTAMP},
- </if>
- <if test="deviceId != null">
- #{deviceId,jdbcType=VARCHAR},
- </if>
- <if test="address != null">
- #{address,jdbcType=VARCHAR},
- </if>
- <if test="income != null">
- #{income,jdbcType=INTEGER},
- </if>
- <if test="carNo != null">
- #{carNo,jdbcType=VARCHAR},
- </if>
- <if test="comId != null">
- #{comId,jdbcType=INTEGER},
- </if>
- <if test="count != null">
- #{count,jdbcType=VARCHAR},
- </if>
- <if test="qrCode != null">
- #{qrCode,jdbcType=VARCHAR},
- </if>
- <if test="isOwner != null">
- #{isOwner,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.js.kbt.model.UserExample" resultType="java.lang.Integer">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- select count(*) from user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- update user
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.mobile != null">
- mobile = #{record.mobile,jdbcType=VARCHAR},
- </if>
- <if test="record.avatar != null">
- avatar = #{record.avatar,jdbcType=VARCHAR},
- </if>
- <if test="record.nickname != null">
- nickname = #{record.nickname,jdbcType=VARCHAR},
- </if>
- <if test="record.token != null">
- token = #{record.token,jdbcType=VARCHAR},
- </if>
- <if test="record.money != null">
- money = #{record.money,jdbcType=INTEGER},
- </if>
- <if test="record.indate != null">
- indate = #{record.indate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.deviceId != null">
- device_id = #{record.deviceId,jdbcType=VARCHAR},
- </if>
- <if test="record.address != null">
- address = #{record.address,jdbcType=VARCHAR},
- </if>
- <if test="record.income != null">
- income = #{record.income,jdbcType=INTEGER},
- </if>
- <if test="record.carNo != null">
- car_no = #{record.carNo,jdbcType=VARCHAR},
- </if>
- <if test="record.comId != null">
- com_id = #{record.comId,jdbcType=INTEGER},
- </if>
- <if test="record.count != null">
- count = #{record.count,jdbcType=VARCHAR},
- </if>
- <if test="record.qrCode != null">
- qr_code = #{record.qrCode,jdbcType=VARCHAR},
- </if>
- <if test="record.isOwner != null">
- is_owner = #{record.isOwner,jdbcType=INTEGER},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- update user
- set id = #{record.id,jdbcType=INTEGER},
- mobile = #{record.mobile,jdbcType=VARCHAR},
- avatar = #{record.avatar,jdbcType=VARCHAR},
- nickname = #{record.nickname,jdbcType=VARCHAR},
- token = #{record.token,jdbcType=VARCHAR},
- money = #{record.money,jdbcType=INTEGER},
- indate = #{record.indate,jdbcType=TIMESTAMP},
- device_id = #{record.deviceId,jdbcType=VARCHAR},
- address = #{record.address,jdbcType=VARCHAR},
- income = #{record.income,jdbcType=INTEGER},
- car_no = #{record.carNo,jdbcType=VARCHAR},
- com_id = #{record.comId,jdbcType=INTEGER},
- count = #{record.count,jdbcType=VARCHAR},
- qr_code = #{record.qrCode,jdbcType=VARCHAR},
- is_owner = #{record.isOwner,jdbcType=INTEGER}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.User">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- update user
- <set>
- <if test="mobile != null">
- mobile = #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="avatar != null">
- avatar = #{avatar,jdbcType=VARCHAR},
- </if>
- <if test="nickname != null">
- nickname = #{nickname,jdbcType=VARCHAR},
- </if>
- <if test="token != null">
- token = #{token,jdbcType=VARCHAR},
- </if>
- <if test="money != null">
- money = #{money,jdbcType=INTEGER},
- </if>
- <if test="indate != null">
- indate = #{indate,jdbcType=TIMESTAMP},
- </if>
- <if test="deviceId != null">
- device_id = #{deviceId,jdbcType=VARCHAR},
- </if>
- <if test="address != null">
- address = #{address,jdbcType=VARCHAR},
- </if>
- <if test="income != null">
- income = #{income,jdbcType=INTEGER},
- </if>
- <if test="carNo != null">
- car_no = #{carNo,jdbcType=VARCHAR},
- </if>
- <if test="comId != null">
- com_id = #{comId,jdbcType=INTEGER},
- </if>
- <if test="count != null">
- count = #{count,jdbcType=VARCHAR},
- </if>
- <if test="qrCode != null">
- qr_code = #{qrCode,jdbcType=VARCHAR},
- </if>
- <if test="isOwner != null">
- is_owner = #{isOwner,jdbcType=INTEGER},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.User">
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Nov 06 13:39:10 CST 2017.
- -->
- update user
- set mobile = #{mobile,jdbcType=VARCHAR},
- avatar = #{avatar,jdbcType=VARCHAR},
- nickname = #{nickname,jdbcType=VARCHAR},
- token = #{token,jdbcType=VARCHAR},
- money = #{money,jdbcType=INTEGER},
- indate = #{indate,jdbcType=TIMESTAMP},
- device_id = #{deviceId,jdbcType=VARCHAR},
- address = #{address,jdbcType=VARCHAR},
- income = #{income,jdbcType=INTEGER},
- car_no = #{carNo,jdbcType=VARCHAR},
- com_id = #{comId,jdbcType=INTEGER},
- count = #{count,jdbcType=VARCHAR},
- qr_code = #{qrCode,jdbcType=VARCHAR},
- is_owner = #{isOwner,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|