|
@@ -1,1244 +1,369 @@
|
|
-<?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.dao.cps.mapper.UserMapper">
|
|
|
|
- <resultMap id="BaseResultMap" type="com.book.dao.cps.pojo.User">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
- <result column="openid" jdbcType="VARCHAR" property="openid" />
|
|
|
|
- <result column="unionid" jdbcType="VARCHAR" property="unionid" />
|
|
|
|
- <result column="visitor" jdbcType="VARCHAR" property="visitor" />
|
|
|
|
- <result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
|
|
|
- <result column="sex" jdbcType="CHAR" property="sex" />
|
|
|
|
- <result column="mobile" jdbcType="CHAR" property="mobile" />
|
|
|
|
- <result column="avatar" jdbcType="VARCHAR" property="avatar" />
|
|
|
|
- <result column="is_subscribe" jdbcType="CHAR" property="isSubscribe" />
|
|
|
|
- <result column="subscription_extend" jdbcType="CHAR" property="subscriptionExtend" />
|
|
|
|
- <result column="subscribe_time" jdbcType="INTEGER" property="subscribeTime" />
|
|
|
|
- <result column="book_category_ids" jdbcType="VARCHAR" property="bookCategoryIds" />
|
|
|
|
- <result column="operate_time" jdbcType="INTEGER" property="operateTime" />
|
|
|
|
- <result column="is_pay" jdbcType="CHAR" property="isPay" />
|
|
|
|
- <result column="kandian" jdbcType="INTEGER" property="kandian" />
|
|
|
|
- <result column="free_kandian" jdbcType="INTEGER" property="freeKandian" />
|
|
|
|
- <result column="vip_endtime" jdbcType="INTEGER" property="vipEndtime" />
|
|
|
|
- <result column="register_ip" jdbcType="VARCHAR" property="registerIp" />
|
|
|
|
- <result column="country" jdbcType="VARCHAR" property="country" />
|
|
|
|
- <result column="area" jdbcType="VARCHAR" property="area" />
|
|
|
|
- <result column="province" jdbcType="VARCHAR" property="province" />
|
|
|
|
- <result column="city" jdbcType="VARCHAR" property="city" />
|
|
|
|
- <result column="isp" jdbcType="VARCHAR" property="isp" />
|
|
|
|
- <result column="channel_id" jdbcType="INTEGER" property="channelId" />
|
|
|
|
- <result column="state" jdbcType="CHAR" property="state" />
|
|
|
|
- <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 Tue Aug 17 22:19:18 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 Tue Aug 17 22:19:18 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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
|
|
|
|
- subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian, vip_endtime,
|
|
|
|
- register_ip, country, area, province, city, isp, channel_id, state, createtime, updatetime
|
|
|
|
- </sql>
|
|
|
|
- <select id="selectByExample" parameterType="com.book.dao.cps.pojo.example.UserExample" resultMap="BaseResultMap">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- 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>
|
|
|
|
- <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 Tue Aug 17 22:19:18 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 user
|
|
|
|
- <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.Long" resultMap="BaseResultMap">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- select
|
|
|
|
- <include refid="Base_Column_List" />
|
|
|
|
- from user
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </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 Tue Aug 17 22:19:18 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 user
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </select>
|
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- delete from user
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </delete>
|
|
|
|
- <delete id="deleteByExample" parameterType="com.book.dao.cps.pojo.example.UserExample">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- delete from user
|
|
|
|
- <if test="_parameter != null">
|
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
|
- </if>
|
|
|
|
- </delete>
|
|
|
|
- <insert id="insert" parameterType="com.book.dao.cps.pojo.User">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- insert into user (id, openid, unionid,
|
|
|
|
- visitor, nickname, sex,
|
|
|
|
- mobile, avatar, is_subscribe,
|
|
|
|
- subscription_extend, subscribe_time, book_category_ids,
|
|
|
|
- operate_time, is_pay, kandian,
|
|
|
|
- free_kandian, vip_endtime, register_ip,
|
|
|
|
- country, area, province,
|
|
|
|
- city, isp, channel_id,
|
|
|
|
- state, createtime, updatetime
|
|
|
|
- )
|
|
|
|
- values (#{id,jdbcType=BIGINT}, #{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR},
|
|
|
|
- #{visitor,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR},
|
|
|
|
- #{mobile,jdbcType=CHAR}, #{avatar,jdbcType=VARCHAR}, #{isSubscribe,jdbcType=CHAR},
|
|
|
|
- #{subscriptionExtend,jdbcType=CHAR}, #{subscribeTime,jdbcType=INTEGER}, #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- #{operateTime,jdbcType=INTEGER}, #{isPay,jdbcType=CHAR}, #{kandian,jdbcType=INTEGER},
|
|
|
|
- #{freeKandian,jdbcType=INTEGER}, #{vipEndtime,jdbcType=INTEGER}, #{registerIp,jdbcType=VARCHAR},
|
|
|
|
- #{country,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
|
|
|
|
- #{city,jdbcType=VARCHAR}, #{isp,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER},
|
|
|
|
- #{state,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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- insert into user
|
|
|
|
- <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.openid != null">
|
|
|
|
- openid,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- unionid,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- visitor,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- nickname,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- sex,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- mobile,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- avatar,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- is_subscribe,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- subscription_extend,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- subscribe_time,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- book_category_ids,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- operate_time,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- is_pay,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- kandian,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- free_kandian,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- vip_endtime,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- register_ip,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- country,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- area,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- province,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- city,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- isp,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- channel_id,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- state,
|
|
|
|
- </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=BIGINT},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.openid != null">
|
|
|
|
- #{record.openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- #{record.unionid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- #{record.visitor,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- #{record.nickname,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- #{record.sex,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- #{record.mobile,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- #{record.avatar,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- #{record.isSubscribe,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- #{record.subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- #{record.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- #{record.bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- #{record.operateTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- #{record.isPay,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- #{record.kandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- #{record.freeKandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- #{record.vipEndtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- #{record.registerIp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- #{record.country,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- #{record.area,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- #{record.province,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- #{record.city,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- #{record.isp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- #{record.channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- #{record.state,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.dao.cps.pojo.example.UserExample" resultType="java.lang.Long">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- select count(*) from user
|
|
|
|
- <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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- update user
|
|
|
|
- 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=BIGINT},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.openid != null">
|
|
|
|
- openid = #{record.openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- unionid = #{record.unionid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- visitor = #{record.visitor,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- sex = #{record.sex,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- mobile = #{record.mobile,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- avatar = #{record.avatar,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- operate_time = #{record.operateTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- is_pay = #{record.isPay,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- kandian = #{record.kandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- free_kandian = #{record.freeKandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- register_ip = #{record.registerIp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- country = #{record.country,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- area = #{record.area,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- province = #{record.province,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- city = #{record.city,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- isp = #{record.isp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- channel_id = #{record.channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- state = #{record.state,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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- update user
|
|
|
|
- set id = #{record.id,jdbcType=BIGINT},
|
|
|
|
- openid = #{record.openid,jdbcType=VARCHAR},
|
|
|
|
- unionid = #{record.unionid,jdbcType=VARCHAR},
|
|
|
|
- visitor = #{record.visitor,jdbcType=VARCHAR},
|
|
|
|
- nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
|
- sex = #{record.sex,jdbcType=CHAR},
|
|
|
|
- mobile = #{record.mobile,jdbcType=CHAR},
|
|
|
|
- avatar = #{record.avatar,jdbcType=VARCHAR},
|
|
|
|
- is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
|
|
|
|
- subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- operate_time = #{record.operateTime,jdbcType=INTEGER},
|
|
|
|
- is_pay = #{record.isPay,jdbcType=CHAR},
|
|
|
|
- kandian = #{record.kandian,jdbcType=INTEGER},
|
|
|
|
- free_kandian = #{record.freeKandian,jdbcType=INTEGER},
|
|
|
|
- vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
|
|
|
|
- register_ip = #{record.registerIp,jdbcType=VARCHAR},
|
|
|
|
- country = #{record.country,jdbcType=VARCHAR},
|
|
|
|
- area = #{record.area,jdbcType=VARCHAR},
|
|
|
|
- province = #{record.province,jdbcType=VARCHAR},
|
|
|
|
- city = #{record.city,jdbcType=VARCHAR},
|
|
|
|
- isp = #{record.isp,jdbcType=VARCHAR},
|
|
|
|
- channel_id = #{record.channelId,jdbcType=INTEGER},
|
|
|
|
- state = #{record.state,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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- update user
|
|
|
|
- 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.openid != null">
|
|
|
|
- openid = #{record.openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- unionid = #{record.unionid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- visitor = #{record.visitor,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- sex = #{record.sex,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- mobile = #{record.mobile,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- avatar = #{record.avatar,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- operate_time = #{record.operateTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- is_pay = #{record.isPay,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- kandian = #{record.kandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- free_kandian = #{record.freeKandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- register_ip = #{record.registerIp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- country = #{record.country,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- area = #{record.area,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- province = #{record.province,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- city = #{record.city,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- isp = #{record.isp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- channel_id = #{record.channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- state = #{record.state,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=BIGINT}
|
|
|
|
- </update>
|
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.book.dao.cps.pojo.User">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- update user
|
|
|
|
- set openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
- unionid = #{unionid,jdbcType=VARCHAR},
|
|
|
|
- visitor = #{visitor,jdbcType=VARCHAR},
|
|
|
|
- nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
|
- sex = #{sex,jdbcType=CHAR},
|
|
|
|
- mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
- avatar = #{avatar,jdbcType=VARCHAR},
|
|
|
|
- is_subscribe = #{isSubscribe,jdbcType=CHAR},
|
|
|
|
- subscription_extend = #{subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- subscribe_time = #{subscribeTime,jdbcType=INTEGER},
|
|
|
|
- book_category_ids = #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- operate_time = #{operateTime,jdbcType=INTEGER},
|
|
|
|
- is_pay = #{isPay,jdbcType=CHAR},
|
|
|
|
- kandian = #{kandian,jdbcType=INTEGER},
|
|
|
|
- free_kandian = #{freeKandian,jdbcType=INTEGER},
|
|
|
|
- vip_endtime = #{vipEndtime,jdbcType=INTEGER},
|
|
|
|
- register_ip = #{registerIp,jdbcType=VARCHAR},
|
|
|
|
- country = #{country,jdbcType=VARCHAR},
|
|
|
|
- area = #{area,jdbcType=VARCHAR},
|
|
|
|
- province = #{province,jdbcType=VARCHAR},
|
|
|
|
- city = #{city,jdbcType=VARCHAR},
|
|
|
|
- isp = #{isp,jdbcType=VARCHAR},
|
|
|
|
- channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
- state = #{state,jdbcType=CHAR},
|
|
|
|
- createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
- updatetime = #{updatetime,jdbcType=INTEGER}
|
|
|
|
- where id = #{id,jdbcType=BIGINT}
|
|
|
|
- </update>
|
|
|
|
- <select id="selectOneByExample" parameterType="com.book.dao.cps.pojo.example.UserExample" resultMap="BaseResultMap">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- select
|
|
|
|
- <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>
|
|
|
|
- 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 Tue Aug 17 22:19:18 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 user
|
|
|
|
- <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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- insert into user
|
|
|
|
- (id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
|
|
|
|
- subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian,
|
|
|
|
- vip_endtime, register_ip, country, area, province, city, isp, channel_id, state,
|
|
|
|
- createtime, updatetime)
|
|
|
|
- values
|
|
|
|
- <foreach collection="list" item="item" separator=",">
|
|
|
|
- (#{item.id,jdbcType=BIGINT}, #{item.openid,jdbcType=VARCHAR}, #{item.unionid,jdbcType=VARCHAR},
|
|
|
|
- #{item.visitor,jdbcType=VARCHAR}, #{item.nickname,jdbcType=VARCHAR}, #{item.sex,jdbcType=CHAR},
|
|
|
|
- #{item.mobile,jdbcType=CHAR}, #{item.avatar,jdbcType=VARCHAR}, #{item.isSubscribe,jdbcType=CHAR},
|
|
|
|
- #{item.subscriptionExtend,jdbcType=CHAR}, #{item.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- #{item.bookCategoryIds,jdbcType=VARCHAR}, #{item.operateTime,jdbcType=INTEGER},
|
|
|
|
- #{item.isPay,jdbcType=CHAR}, #{item.kandian,jdbcType=INTEGER}, #{item.freeKandian,jdbcType=INTEGER},
|
|
|
|
- #{item.vipEndtime,jdbcType=INTEGER}, #{item.registerIp,jdbcType=VARCHAR}, #{item.country,jdbcType=VARCHAR},
|
|
|
|
- #{item.area,jdbcType=VARCHAR}, #{item.province,jdbcType=VARCHAR}, #{item.city,jdbcType=VARCHAR},
|
|
|
|
- #{item.isp,jdbcType=VARCHAR}, #{item.channelId,jdbcType=INTEGER}, #{item.state,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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- insert into user (
|
|
|
|
- <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=BIGINT}
|
|
|
|
- </if>
|
|
|
|
- <if test="'openid'.toString() == column.value">
|
|
|
|
- #{item.openid,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'unionid'.toString() == column.value">
|
|
|
|
- #{item.unionid,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'visitor'.toString() == column.value">
|
|
|
|
- #{item.visitor,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'nickname'.toString() == column.value">
|
|
|
|
- #{item.nickname,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'sex'.toString() == column.value">
|
|
|
|
- #{item.sex,jdbcType=CHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'mobile'.toString() == column.value">
|
|
|
|
- #{item.mobile,jdbcType=CHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'avatar'.toString() == column.value">
|
|
|
|
- #{item.avatar,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'is_subscribe'.toString() == column.value">
|
|
|
|
- #{item.isSubscribe,jdbcType=CHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'subscription_extend'.toString() == column.value">
|
|
|
|
- #{item.subscriptionExtend,jdbcType=CHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'subscribe_time'.toString() == column.value">
|
|
|
|
- #{item.subscribeTime,jdbcType=INTEGER}
|
|
|
|
- </if>
|
|
|
|
- <if test="'book_category_ids'.toString() == column.value">
|
|
|
|
- #{item.bookCategoryIds,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'operate_time'.toString() == column.value">
|
|
|
|
- #{item.operateTime,jdbcType=INTEGER}
|
|
|
|
- </if>
|
|
|
|
- <if test="'is_pay'.toString() == column.value">
|
|
|
|
- #{item.isPay,jdbcType=CHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'kandian'.toString() == column.value">
|
|
|
|
- #{item.kandian,jdbcType=INTEGER}
|
|
|
|
- </if>
|
|
|
|
- <if test="'free_kandian'.toString() == column.value">
|
|
|
|
- #{item.freeKandian,jdbcType=INTEGER}
|
|
|
|
- </if>
|
|
|
|
- <if test="'vip_endtime'.toString() == column.value">
|
|
|
|
- #{item.vipEndtime,jdbcType=INTEGER}
|
|
|
|
- </if>
|
|
|
|
- <if test="'register_ip'.toString() == column.value">
|
|
|
|
- #{item.registerIp,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'country'.toString() == column.value">
|
|
|
|
- #{item.country,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'area'.toString() == column.value">
|
|
|
|
- #{item.area,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'province'.toString() == column.value">
|
|
|
|
- #{item.province,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'city'.toString() == column.value">
|
|
|
|
- #{item.city,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'isp'.toString() == column.value">
|
|
|
|
- #{item.isp,jdbcType=VARCHAR}
|
|
|
|
- </if>
|
|
|
|
- <if test="'channel_id'.toString() == column.value">
|
|
|
|
- #{item.channelId,jdbcType=INTEGER}
|
|
|
|
- </if>
|
|
|
|
- <if test="'state'.toString() == column.value">
|
|
|
|
- #{item.state,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 Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- insert into user
|
|
|
|
- <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.openid != null">
|
|
|
|
- openid,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- unionid,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- visitor,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- nickname,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- sex,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- mobile,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- avatar,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- is_subscribe,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- subscription_extend,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- subscribe_time,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- book_category_ids,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- operate_time,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- is_pay,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- kandian,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- free_kandian,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- vip_endtime,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- register_ip,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- country,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- area,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- province,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- city,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- isp,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- channel_id,
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- state,
|
|
|
|
- </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=BIGINT},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.openid != null">
|
|
|
|
- #{record.openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- #{record.unionid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- #{record.visitor,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- #{record.nickname,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- #{record.sex,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- #{record.mobile,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- #{record.avatar,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- #{record.isSubscribe,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- #{record.subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- #{record.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- #{record.bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- #{record.operateTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- #{record.isPay,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- #{record.kandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- #{record.freeKandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- #{record.vipEndtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- #{record.registerIp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- #{record.country,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- #{record.area,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- #{record.province,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- #{record.city,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- #{record.isp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- #{record.channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- #{record.state,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=BIGINT},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.openid != null">
|
|
|
|
- openid = #{record.openid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.unionid != null">
|
|
|
|
- unionid = #{record.unionid,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.visitor != null">
|
|
|
|
- visitor = #{record.visitor,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.nickname != null">
|
|
|
|
- nickname = #{record.nickname,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.sex != null">
|
|
|
|
- sex = #{record.sex,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.mobile != null">
|
|
|
|
- mobile = #{record.mobile,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.avatar != null">
|
|
|
|
- avatar = #{record.avatar,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isSubscribe != null">
|
|
|
|
- is_subscribe = #{record.isSubscribe,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscriptionExtend != null">
|
|
|
|
- subscription_extend = #{record.subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.subscribeTime != null">
|
|
|
|
- subscribe_time = #{record.subscribeTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.bookCategoryIds != null">
|
|
|
|
- book_category_ids = #{record.bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.operateTime != null">
|
|
|
|
- operate_time = #{record.operateTime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isPay != null">
|
|
|
|
- is_pay = #{record.isPay,jdbcType=CHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.kandian != null">
|
|
|
|
- kandian = #{record.kandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.freeKandian != null">
|
|
|
|
- free_kandian = #{record.freeKandian,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.vipEndtime != null">
|
|
|
|
- vip_endtime = #{record.vipEndtime,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.registerIp != null">
|
|
|
|
- register_ip = #{record.registerIp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.country != null">
|
|
|
|
- country = #{record.country,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.area != null">
|
|
|
|
- area = #{record.area,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.province != null">
|
|
|
|
- province = #{record.province,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.city != null">
|
|
|
|
- city = #{record.city,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.isp != null">
|
|
|
|
- isp = #{record.isp,jdbcType=VARCHAR},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.channelId != null">
|
|
|
|
- channel_id = #{record.channelId,jdbcType=INTEGER},
|
|
|
|
- </if>
|
|
|
|
- <if test="record.state != null">
|
|
|
|
- state = #{record.state,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.dao.cps.pojo.User">
|
|
|
|
- <!--
|
|
|
|
- WARNING - @mbg.generated
|
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
|
- This element was generated on Tue Aug 17 22:19:18 CST 2021.
|
|
|
|
- -->
|
|
|
|
- insert into user
|
|
|
|
- (id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
|
|
|
|
- subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian,
|
|
|
|
- vip_endtime, register_ip, country, area, province, city, isp, channel_id, state,
|
|
|
|
- createtime, updatetime)
|
|
|
|
- values
|
|
|
|
- (#{id,jdbcType=BIGINT}, #{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR},
|
|
|
|
- #{visitor,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=CHAR},
|
|
|
|
- #{mobile,jdbcType=CHAR}, #{avatar,jdbcType=VARCHAR}, #{isSubscribe,jdbcType=CHAR},
|
|
|
|
- #{subscriptionExtend,jdbcType=CHAR}, #{subscribeTime,jdbcType=INTEGER}, #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- #{operateTime,jdbcType=INTEGER}, #{isPay,jdbcType=CHAR}, #{kandian,jdbcType=INTEGER},
|
|
|
|
- #{freeKandian,jdbcType=INTEGER}, #{vipEndtime,jdbcType=INTEGER}, #{registerIp,jdbcType=VARCHAR},
|
|
|
|
- #{country,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR},
|
|
|
|
- #{city,jdbcType=VARCHAR}, #{isp,jdbcType=VARCHAR}, #{channelId,jdbcType=INTEGER},
|
|
|
|
- #{state,jdbcType=CHAR}, #{createtime,jdbcType=INTEGER}, #{updatetime,jdbcType=INTEGER}
|
|
|
|
- )
|
|
|
|
- on duplicate key update
|
|
|
|
- id = #{id,jdbcType=BIGINT},
|
|
|
|
- openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
- unionid = #{unionid,jdbcType=VARCHAR},
|
|
|
|
- visitor = #{visitor,jdbcType=VARCHAR},
|
|
|
|
- nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
|
- sex = #{sex,jdbcType=CHAR},
|
|
|
|
- mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
- avatar = #{avatar,jdbcType=VARCHAR},
|
|
|
|
- is_subscribe = #{isSubscribe,jdbcType=CHAR},
|
|
|
|
- subscription_extend = #{subscriptionExtend,jdbcType=CHAR},
|
|
|
|
- subscribe_time = #{subscribeTime,jdbcType=INTEGER},
|
|
|
|
- book_category_ids = #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
- operate_time = #{operateTime,jdbcType=INTEGER},
|
|
|
|
- is_pay = #{isPay,jdbcType=CHAR},
|
|
|
|
- kandian = #{kandian,jdbcType=INTEGER},
|
|
|
|
- free_kandian = #{freeKandian,jdbcType=INTEGER},
|
|
|
|
- vip_endtime = #{vipEndtime,jdbcType=INTEGER},
|
|
|
|
- register_ip = #{registerIp,jdbcType=VARCHAR},
|
|
|
|
- country = #{country,jdbcType=VARCHAR},
|
|
|
|
- area = #{area,jdbcType=VARCHAR},
|
|
|
|
- province = #{province,jdbcType=VARCHAR},
|
|
|
|
- city = #{city,jdbcType=VARCHAR},
|
|
|
|
- isp = #{isp,jdbcType=VARCHAR},
|
|
|
|
- channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
- state = #{state,jdbcType=CHAR},
|
|
|
|
- createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
- updatetime = #{updatetime,jdbcType=INTEGER}
|
|
|
|
- </insert>
|
|
|
|
|
|
+<?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.push.dao.mapper.UserMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.book.push.dao.pojo.User">
|
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
|
+ <result column="openid" jdbcType="VARCHAR" property="openid" />
|
|
|
|
+ <result column="unionid" jdbcType="VARCHAR" property="unionid" />
|
|
|
|
+ <result column="visitor" jdbcType="VARCHAR" property="visitor" />
|
|
|
|
+ <result column="nickname" jdbcType="VARCHAR" property="nickname" />
|
|
|
|
+ <result column="sex" jdbcType="OTHER" property="sex" />
|
|
|
|
+ <result column="mobile" jdbcType="CHAR" property="mobile" />
|
|
|
|
+ <result column="avatar" jdbcType="VARCHAR" property="avatar" />
|
|
|
|
+ <result column="is_subscribe" jdbcType="OTHER" property="isSubscribe" />
|
|
|
|
+ <result column="subscription_extend" jdbcType="OTHER" property="subscriptionExtend" />
|
|
|
|
+ <result column="subscribe_time" jdbcType="INTEGER" property="subscribeTime" />
|
|
|
|
+ <result column="book_category_ids" jdbcType="VARCHAR" property="bookCategoryIds" />
|
|
|
|
+ <result column="operate_time" jdbcType="INTEGER" property="operateTime" />
|
|
|
|
+ <result column="is_pay" jdbcType="OTHER" property="isPay" />
|
|
|
|
+ <result column="kandian" jdbcType="INTEGER" property="kandian" />
|
|
|
|
+ <result column="free_kandian" jdbcType="INTEGER" property="freeKandian" />
|
|
|
|
+ <result column="vip_endtime" jdbcType="INTEGER" property="vipEndtime" />
|
|
|
|
+ <result column="register_ip" jdbcType="VARCHAR" property="registerIp" />
|
|
|
|
+ <result column="country" jdbcType="VARCHAR" property="country" />
|
|
|
|
+ <result column="area" jdbcType="VARCHAR" property="area" />
|
|
|
|
+ <result column="province" jdbcType="VARCHAR" property="province" />
|
|
|
|
+ <result column="city" jdbcType="VARCHAR" property="city" />
|
|
|
|
+ <result column="isp" jdbcType="VARCHAR" property="isp" />
|
|
|
|
+ <result column="channel_id" jdbcType="INTEGER" property="channelId" />
|
|
|
|
+ <result column="state" jdbcType="OTHER" property="state" />
|
|
|
|
+ <result column="createtime" jdbcType="INTEGER" property="createtime" />
|
|
|
|
+ <result column="updatetime" jdbcType="INTEGER" property="updatetime" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
+ id, openid, unionid, visitor, nickname, sex, mobile, avatar, is_subscribe, subscription_extend,
|
|
|
|
+ subscribe_time, book_category_ids, operate_time, is_pay, kandian, free_kandian, vip_endtime,
|
|
|
|
+ register_ip, country, area, province, city, isp, channel_id, `state`, createtime,
|
|
|
|
+ updatetime
|
|
|
|
+ </sql>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
|
+ from user
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectByUser" resultType="com.book.push.dao.pojo.User" parameterType="com.book.push.dao.pojo.User">
|
|
|
|
+
|
|
|
|
+ select id from user
|
|
|
|
+ <trim prefix="WHERE" prefixOverrides="AND | OR">
|
|
|
|
+ <if test="openid!=null and openid!=''">
|
|
|
|
+ and openid != #{openid}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile!=null and mobile!=''">
|
|
|
|
+ and mobile != #{mobile}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channel_id!=null and channel_id!=0">
|
|
|
|
+ and channel_id != #{channel_id}
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </trim>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </select>
|
|
|
|
+ <select id="selectByOpenId" resultType="com.book.push.dao.pojo.User">
|
|
|
|
+ SELECT * from user WHERE openid = #{openid}
|
|
|
|
+ </select>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
|
+ delete from user
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.book.push.dao.pojo.User" useGeneratedKeys="true">
|
|
|
|
+ insert into user (openid, unionid, visitor,
|
|
|
|
+ nickname, sex, mobile, avatar,
|
|
|
|
+ is_subscribe, subscription_extend, subscribe_time,
|
|
|
|
+ book_category_ids, operate_time, is_pay,
|
|
|
|
+ kandian, free_kandian, vip_endtime,
|
|
|
|
+ register_ip, country, area,
|
|
|
|
+ province, city, isp,
|
|
|
|
+ channel_id, `state`, createtime,
|
|
|
|
+ updatetime)
|
|
|
|
+ values (#{openid,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR}, #{visitor,jdbcType=VARCHAR},
|
|
|
|
+ #{nickname,jdbcType=VARCHAR}, #{sex,jdbcType=OTHER}, #{mobile,jdbcType=CHAR}, #{avatar,jdbcType=VARCHAR},
|
|
|
|
+ #{isSubscribe,jdbcType=OTHER}, #{subscriptionExtend,jdbcType=OTHER}, #{subscribeTime,jdbcType=INTEGER},
|
|
|
|
+ #{bookCategoryIds,jdbcType=VARCHAR}, #{operateTime,jdbcType=INTEGER}, #{isPay,jdbcType=OTHER},
|
|
|
|
+ #{kandian,jdbcType=INTEGER}, #{freeKandian,jdbcType=INTEGER}, #{vipEndtime,jdbcType=INTEGER},
|
|
|
|
+ #{registerIp,jdbcType=VARCHAR}, #{country,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR},
|
|
|
|
+ #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{isp,jdbcType=VARCHAR},
|
|
|
|
+ #{channelId,jdbcType=INTEGER}, #{state,jdbcType=OTHER}, #{createtime,jdbcType=INTEGER},
|
|
|
|
+ #{updatetime,jdbcType=INTEGER})
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.book.push.dao.pojo.User" useGeneratedKeys="true">
|
|
|
|
+ insert into user
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="openid != null">
|
|
|
|
+ openid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="unionid != null">
|
|
|
|
+ unionid,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="visitor != null">
|
|
|
|
+ visitor,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nickname != null">
|
|
|
|
+ nickname,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sex != null">
|
|
|
|
+ sex,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null">
|
|
|
|
+ mobile,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="avatar != null">
|
|
|
|
+ avatar,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isSubscribe != null">
|
|
|
|
+ is_subscribe,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subscriptionExtend != null">
|
|
|
|
+ subscription_extend,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subscribeTime != null">
|
|
|
|
+ subscribe_time,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bookCategoryIds != null">
|
|
|
|
+ book_category_ids,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="operateTime != null">
|
|
|
|
+ operate_time,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isPay != null">
|
|
|
|
+ is_pay,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="kandian != null">
|
|
|
|
+ kandian,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="freeKandian != null">
|
|
|
|
+ free_kandian,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="vipEndtime != null">
|
|
|
|
+ vip_endtime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="registerIp != null">
|
|
|
|
+ register_ip,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="country != null">
|
|
|
|
+ country,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="area != null">
|
|
|
|
+ area,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="province != null">
|
|
|
|
+ province,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="city != null">
|
|
|
|
+ city,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isp != null">
|
|
|
|
+ isp,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId != null">
|
|
|
|
+ channel_id,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="state != null">
|
|
|
|
+ `state`,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ createtime,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ updatetime,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="openid != null">
|
|
|
|
+ #{openid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="unionid != null">
|
|
|
|
+ #{unionid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="visitor != null">
|
|
|
|
+ #{visitor,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nickname != null">
|
|
|
|
+ #{nickname,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sex != null">
|
|
|
|
+ #{sex,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null">
|
|
|
|
+ #{mobile,jdbcType=CHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="avatar != null">
|
|
|
|
+ #{avatar,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isSubscribe != null">
|
|
|
|
+ #{isSubscribe,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subscriptionExtend != null">
|
|
|
|
+ #{subscriptionExtend,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subscribeTime != null">
|
|
|
|
+ #{subscribeTime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bookCategoryIds != null">
|
|
|
|
+ #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="operateTime != null">
|
|
|
|
+ #{operateTime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isPay != null">
|
|
|
|
+ #{isPay,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="kandian != null">
|
|
|
|
+ #{kandian,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="freeKandian != null">
|
|
|
|
+ #{freeKandian,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="vipEndtime != null">
|
|
|
|
+ #{vipEndtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="registerIp != null">
|
|
|
|
+ #{registerIp,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="country != null">
|
|
|
|
+ #{country,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="area != null">
|
|
|
|
+ #{area,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="province != null">
|
|
|
|
+ #{province,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="city != null">
|
|
|
|
+ #{city,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isp != null">
|
|
|
|
+ #{isp,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId != null">
|
|
|
|
+ #{channelId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="state != null">
|
|
|
|
+ #{state,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ #{createtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.book.push.dao.pojo.User">
|
|
|
|
+ update user
|
|
|
|
+ <set>
|
|
|
|
+ <if test="openid != null">
|
|
|
|
+ openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="unionid != null">
|
|
|
|
+ unionid = #{unionid,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="visitor != null">
|
|
|
|
+ visitor = #{visitor,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nickname != null">
|
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="sex != null">
|
|
|
|
+ sex = #{sex,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="mobile != null">
|
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="avatar != null">
|
|
|
|
+ avatar = #{avatar,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isSubscribe != null">
|
|
|
|
+ is_subscribe = #{isSubscribe,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subscriptionExtend != null">
|
|
|
|
+ subscription_extend = #{subscriptionExtend,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="subscribeTime != null">
|
|
|
|
+ subscribe_time = #{subscribeTime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="bookCategoryIds != null">
|
|
|
|
+ book_category_ids = #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="operateTime != null">
|
|
|
|
+ operate_time = #{operateTime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isPay != null">
|
|
|
|
+ is_pay = #{isPay,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="kandian != null">
|
|
|
|
+ kandian = #{kandian,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="freeKandian != null">
|
|
|
|
+ free_kandian = #{freeKandian,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="vipEndtime != null">
|
|
|
|
+ vip_endtime = #{vipEndtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="registerIp != null">
|
|
|
|
+ register_ip = #{registerIp,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="country != null">
|
|
|
|
+ country = #{country,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="area != null">
|
|
|
|
+ area = #{area,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="province != null">
|
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="city != null">
|
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="isp != null">
|
|
|
|
+ isp = #{isp,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="channelId != null">
|
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="state != null">
|
|
|
|
+ `state` = #{state,jdbcType=OTHER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="createtime != null">
|
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="updatetime != null">
|
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.book.push.dao.pojo.User">
|
|
|
|
+ update user
|
|
|
|
+ set openid = #{openid,jdbcType=VARCHAR},
|
|
|
|
+ unionid = #{unionid,jdbcType=VARCHAR},
|
|
|
|
+ visitor = #{visitor,jdbcType=VARCHAR},
|
|
|
|
+ nickname = #{nickname,jdbcType=VARCHAR},
|
|
|
|
+ sex = #{sex,jdbcType=OTHER},
|
|
|
|
+ mobile = #{mobile,jdbcType=CHAR},
|
|
|
|
+ avatar = #{avatar,jdbcType=VARCHAR},
|
|
|
|
+ is_subscribe = #{isSubscribe,jdbcType=OTHER},
|
|
|
|
+ subscription_extend = #{subscriptionExtend,jdbcType=OTHER},
|
|
|
|
+ subscribe_time = #{subscribeTime,jdbcType=INTEGER},
|
|
|
|
+ book_category_ids = #{bookCategoryIds,jdbcType=VARCHAR},
|
|
|
|
+ operate_time = #{operateTime,jdbcType=INTEGER},
|
|
|
|
+ is_pay = #{isPay,jdbcType=OTHER},
|
|
|
|
+ kandian = #{kandian,jdbcType=INTEGER},
|
|
|
|
+ free_kandian = #{freeKandian,jdbcType=INTEGER},
|
|
|
|
+ vip_endtime = #{vipEndtime,jdbcType=INTEGER},
|
|
|
|
+ register_ip = #{registerIp,jdbcType=VARCHAR},
|
|
|
|
+ country = #{country,jdbcType=VARCHAR},
|
|
|
|
+ area = #{area,jdbcType=VARCHAR},
|
|
|
|
+ province = #{province,jdbcType=VARCHAR},
|
|
|
|
+ city = #{city,jdbcType=VARCHAR},
|
|
|
|
+ isp = #{isp,jdbcType=VARCHAR},
|
|
|
|
+ channel_id = #{channelId,jdbcType=INTEGER},
|
|
|
|
+ `state` = #{state,jdbcType=OTHER},
|
|
|
|
+ createtime = #{createtime,jdbcType=INTEGER},
|
|
|
|
+ updatetime = #{updatetime,jdbcType=INTEGER}
|
|
|
|
+ where id = #{id,jdbcType=BIGINT}
|
|
|
|
+ </update>
|
|
</mapper>
|
|
</mapper>
|