123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527 |
- <?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="cn.kdan.cloud.pdf.office.account.mapper.UserMapper">
- <resultMap id="BaseResultMap" type="cn.kdan.cloud.pdf.office.account.model.User">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="company_id" jdbcType="VARCHAR" property="companyId" />
- <result column="app_id" jdbcType="VARCHAR" property="appId" />
- <result column="email" jdbcType="VARCHAR" property="email" />
- <result column="full_name" jdbcType="VARCHAR" property="fullName" />
- <result column="subscriber_type" jdbcType="INTEGER" property="subscriberType" />
- <result column="subscribed" jdbcType="INTEGER" property="subscribed" />
- <result column="digest_password" jdbcType="VARCHAR" property="digestPassword" />
- <result column="phone" jdbcType="VARCHAR" property="phone" />
- <result column="industry" jdbcType="VARCHAR" property="industry" />
- <result column="last_popularize_at" jdbcType="INTEGER" property="lastPopularizeAt" />
- <result column="last_presented_coupon_at" jdbcType="TIMESTAMP" property="lastPresentedCouponAt" />
- <result column="mailable" jdbcType="INTEGER" property="mailable" />
- <result column="reset_token" jdbcType="INTEGER" property="resetToken" />
- <result column="role" jdbcType="VARCHAR" property="role" />
- <result column="job" jdbcType="VARCHAR" property="job" />
- <result column="area" jdbcType="VARCHAR" property="area" />
- <result column="platform_type" jdbcType="TINYINT" property="platformType" />
- <result column="account_type" jdbcType="TINYINT" property="accountType" />
- <result column="account_source" jdbcType="TINYINT" property="accountSource" />
- <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
- <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
- <result column="remark" jdbcType="VARCHAR" property="remark" />
- <result column="valid_flag" jdbcType="VARCHAR" property="validFlag" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- id, company_id, app_id, email, full_name, subscriber_type, subscribed, digest_password,
- phone, industry, last_popularize_at, last_presented_coupon_at, mailable, reset_token,
- `role`, job, area, platform_type, account_type, account_source, created_at, updated_at,
- remark, valid_flag
- </sql>
- <select id="selectByExample" parameterType="cn.kdan.cloud.pdf.office.account.model.UserExample" resultMap="BaseResultMap">
- 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.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from user
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from user
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="cn.kdan.cloud.pdf.office.account.model.UserExample">
- delete from user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="cn.kdan.cloud.pdf.office.account.model.User">
- insert into user (id, company_id, app_id,
- email, full_name, subscriber_type,
- subscribed, digest_password, phone,
- industry, last_popularize_at, last_presented_coupon_at,
- mailable, reset_token, `role`,
- job, area, platform_type,
- account_type, account_source, created_at,
- updated_at, remark, valid_flag
- )
- values (#{id,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
- #{email,jdbcType=VARCHAR}, #{fullName,jdbcType=VARCHAR}, #{subscriberType,jdbcType=INTEGER},
- #{subscribed,jdbcType=INTEGER}, #{digestPassword,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
- #{industry,jdbcType=VARCHAR}, #{lastPopularizeAt,jdbcType=INTEGER}, #{lastPresentedCouponAt,jdbcType=TIMESTAMP},
- #{mailable,jdbcType=INTEGER}, #{resetToken,jdbcType=INTEGER}, #{role,jdbcType=VARCHAR},
- #{job,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{platformType,jdbcType=TINYINT},
- #{accountType,jdbcType=TINYINT}, #{accountSource,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP},
- #{updatedAt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, #{validFlag,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="cn.kdan.cloud.pdf.office.account.model.User">
- insert into user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="companyId != null">
- company_id,
- </if>
- <if test="appId != null">
- app_id,
- </if>
- <if test="email != null">
- email,
- </if>
- <if test="fullName != null">
- full_name,
- </if>
- <if test="subscriberType != null">
- subscriber_type,
- </if>
- <if test="subscribed != null">
- subscribed,
- </if>
- <if test="digestPassword != null">
- digest_password,
- </if>
- <if test="phone != null">
- phone,
- </if>
- <if test="industry != null">
- industry,
- </if>
- <if test="lastPopularizeAt != null">
- last_popularize_at,
- </if>
- <if test="lastPresentedCouponAt != null">
- last_presented_coupon_at,
- </if>
- <if test="mailable != null">
- mailable,
- </if>
- <if test="resetToken != null">
- reset_token,
- </if>
- <if test="role != null">
- `role`,
- </if>
- <if test="job != null">
- job,
- </if>
- <if test="area != null">
- area,
- </if>
- <if test="platformType != null">
- platform_type,
- </if>
- <if test="accountType != null">
- account_type,
- </if>
- <if test="accountSource != null">
- account_source,
- </if>
- <if test="createdAt != null">
- created_at,
- </if>
- <if test="updatedAt != null">
- updated_at,
- </if>
- <if test="remark != null">
- remark,
- </if>
- <if test="validFlag != null">
- valid_flag,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="companyId != null">
- #{companyId,jdbcType=VARCHAR},
- </if>
- <if test="appId != null">
- #{appId,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- #{email,jdbcType=VARCHAR},
- </if>
- <if test="fullName != null">
- #{fullName,jdbcType=VARCHAR},
- </if>
- <if test="subscriberType != null">
- #{subscriberType,jdbcType=INTEGER},
- </if>
- <if test="subscribed != null">
- #{subscribed,jdbcType=INTEGER},
- </if>
- <if test="digestPassword != null">
- #{digestPassword,jdbcType=VARCHAR},
- </if>
- <if test="phone != null">
- #{phone,jdbcType=VARCHAR},
- </if>
- <if test="industry != null">
- #{industry,jdbcType=VARCHAR},
- </if>
- <if test="lastPopularizeAt != null">
- #{lastPopularizeAt,jdbcType=INTEGER},
- </if>
- <if test="lastPresentedCouponAt != null">
- #{lastPresentedCouponAt,jdbcType=TIMESTAMP},
- </if>
- <if test="mailable != null">
- #{mailable,jdbcType=INTEGER},
- </if>
- <if test="resetToken != null">
- #{resetToken,jdbcType=INTEGER},
- </if>
- <if test="role != null">
- #{role,jdbcType=VARCHAR},
- </if>
- <if test="job != null">
- #{job,jdbcType=VARCHAR},
- </if>
- <if test="area != null">
- #{area,jdbcType=VARCHAR},
- </if>
- <if test="platformType != null">
- #{platformType,jdbcType=TINYINT},
- </if>
- <if test="accountType != null">
- #{accountType,jdbcType=TINYINT},
- </if>
- <if test="accountSource != null">
- #{accountSource,jdbcType=TINYINT},
- </if>
- <if test="createdAt != null">
- #{createdAt,jdbcType=TIMESTAMP},
- </if>
- <if test="updatedAt != null">
- #{updatedAt,jdbcType=TIMESTAMP},
- </if>
- <if test="remark != null">
- #{remark,jdbcType=VARCHAR},
- </if>
- <if test="validFlag != null">
- #{validFlag,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="cn.kdan.cloud.pdf.office.account.model.UserExample" resultType="java.lang.Long">
- select count(*) from user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update user
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=VARCHAR},
- </if>
- <if test="record.companyId != null">
- company_id = #{record.companyId,jdbcType=VARCHAR},
- </if>
- <if test="record.appId != null">
- app_id = #{record.appId,jdbcType=VARCHAR},
- </if>
- <if test="record.email != null">
- email = #{record.email,jdbcType=VARCHAR},
- </if>
- <if test="record.fullName != null">
- full_name = #{record.fullName,jdbcType=VARCHAR},
- </if>
- <if test="record.subscriberType != null">
- subscriber_type = #{record.subscriberType,jdbcType=INTEGER},
- </if>
- <if test="record.subscribed != null">
- subscribed = #{record.subscribed,jdbcType=INTEGER},
- </if>
- <if test="record.digestPassword != null">
- digest_password = #{record.digestPassword,jdbcType=VARCHAR},
- </if>
- <if test="record.phone != null">
- phone = #{record.phone,jdbcType=VARCHAR},
- </if>
- <if test="record.industry != null">
- industry = #{record.industry,jdbcType=VARCHAR},
- </if>
- <if test="record.lastPopularizeAt != null">
- last_popularize_at = #{record.lastPopularizeAt,jdbcType=INTEGER},
- </if>
- <if test="record.lastPresentedCouponAt != null">
- last_presented_coupon_at = #{record.lastPresentedCouponAt,jdbcType=TIMESTAMP},
- </if>
- <if test="record.mailable != null">
- mailable = #{record.mailable,jdbcType=INTEGER},
- </if>
- <if test="record.resetToken != null">
- reset_token = #{record.resetToken,jdbcType=INTEGER},
- </if>
- <if test="record.role != null">
- `role` = #{record.role,jdbcType=VARCHAR},
- </if>
- <if test="record.job != null">
- job = #{record.job,jdbcType=VARCHAR},
- </if>
- <if test="record.area != null">
- area = #{record.area,jdbcType=VARCHAR},
- </if>
- <if test="record.platformType != null">
- platform_type = #{record.platformType,jdbcType=TINYINT},
- </if>
- <if test="record.accountType != null">
- account_type = #{record.accountType,jdbcType=TINYINT},
- </if>
- <if test="record.accountSource != null">
- account_source = #{record.accountSource,jdbcType=TINYINT},
- </if>
- <if test="record.createdAt != null">
- created_at = #{record.createdAt,jdbcType=TIMESTAMP},
- </if>
- <if test="record.updatedAt != null">
- updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
- </if>
- <if test="record.remark != null">
- remark = #{record.remark,jdbcType=VARCHAR},
- </if>
- <if test="record.validFlag != null">
- valid_flag = #{record.validFlag,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update user
- set id = #{record.id,jdbcType=VARCHAR},
- company_id = #{record.companyId,jdbcType=VARCHAR},
- app_id = #{record.appId,jdbcType=VARCHAR},
- email = #{record.email,jdbcType=VARCHAR},
- full_name = #{record.fullName,jdbcType=VARCHAR},
- subscriber_type = #{record.subscriberType,jdbcType=INTEGER},
- subscribed = #{record.subscribed,jdbcType=INTEGER},
- digest_password = #{record.digestPassword,jdbcType=VARCHAR},
- phone = #{record.phone,jdbcType=VARCHAR},
- industry = #{record.industry,jdbcType=VARCHAR},
- last_popularize_at = #{record.lastPopularizeAt,jdbcType=INTEGER},
- last_presented_coupon_at = #{record.lastPresentedCouponAt,jdbcType=TIMESTAMP},
- mailable = #{record.mailable,jdbcType=INTEGER},
- reset_token = #{record.resetToken,jdbcType=INTEGER},
- `role` = #{record.role,jdbcType=VARCHAR},
- job = #{record.job,jdbcType=VARCHAR},
- area = #{record.area,jdbcType=VARCHAR},
- platform_type = #{record.platformType,jdbcType=TINYINT},
- account_type = #{record.accountType,jdbcType=TINYINT},
- account_source = #{record.accountSource,jdbcType=TINYINT},
- created_at = #{record.createdAt,jdbcType=TIMESTAMP},
- updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
- remark = #{record.remark,jdbcType=VARCHAR},
- valid_flag = #{record.validFlag,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="cn.kdan.cloud.pdf.office.account.model.User">
- update user
- <set>
- <if test="companyId != null">
- company_id = #{companyId,jdbcType=VARCHAR},
- </if>
- <if test="appId != null">
- app_id = #{appId,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="fullName != null">
- full_name = #{fullName,jdbcType=VARCHAR},
- </if>
- <if test="subscriberType != null">
- subscriber_type = #{subscriberType,jdbcType=INTEGER},
- </if>
- <if test="subscribed != null">
- subscribed = #{subscribed,jdbcType=INTEGER},
- </if>
- <if test="digestPassword != null">
- digest_password = #{digestPassword,jdbcType=VARCHAR},
- </if>
- <if test="phone != null">
- phone = #{phone,jdbcType=VARCHAR},
- </if>
- <if test="industry != null">
- industry = #{industry,jdbcType=VARCHAR},
- </if>
- <if test="lastPopularizeAt != null">
- last_popularize_at = #{lastPopularizeAt,jdbcType=INTEGER},
- </if>
- <if test="lastPresentedCouponAt != null">
- last_presented_coupon_at = #{lastPresentedCouponAt,jdbcType=TIMESTAMP},
- </if>
- <if test="mailable != null">
- mailable = #{mailable,jdbcType=INTEGER},
- </if>
- <if test="resetToken != null">
- reset_token = #{resetToken,jdbcType=INTEGER},
- </if>
- <if test="role != null">
- `role` = #{role,jdbcType=VARCHAR},
- </if>
- <if test="job != null">
- job = #{job,jdbcType=VARCHAR},
- </if>
- <if test="area != null">
- area = #{area,jdbcType=VARCHAR},
- </if>
- <if test="platformType != null">
- platform_type = #{platformType,jdbcType=TINYINT},
- </if>
- <if test="accountType != null">
- account_type = #{accountType,jdbcType=TINYINT},
- </if>
- <if test="accountSource != null">
- account_source = #{accountSource,jdbcType=TINYINT},
- </if>
- <if test="createdAt != null">
- created_at = #{createdAt,jdbcType=TIMESTAMP},
- </if>
- <if test="updatedAt != null">
- updated_at = #{updatedAt,jdbcType=TIMESTAMP},
- </if>
- <if test="remark != null">
- remark = #{remark,jdbcType=VARCHAR},
- </if>
- <if test="validFlag != null">
- valid_flag = #{validFlag,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="cn.kdan.cloud.pdf.office.account.model.User">
- update user
- set company_id = #{companyId,jdbcType=VARCHAR},
- app_id = #{appId,jdbcType=VARCHAR},
- email = #{email,jdbcType=VARCHAR},
- full_name = #{fullName,jdbcType=VARCHAR},
- subscriber_type = #{subscriberType,jdbcType=INTEGER},
- subscribed = #{subscribed,jdbcType=INTEGER},
- digest_password = #{digestPassword,jdbcType=VARCHAR},
- phone = #{phone,jdbcType=VARCHAR},
- industry = #{industry,jdbcType=VARCHAR},
- last_popularize_at = #{lastPopularizeAt,jdbcType=INTEGER},
- last_presented_coupon_at = #{lastPresentedCouponAt,jdbcType=TIMESTAMP},
- mailable = #{mailable,jdbcType=INTEGER},
- reset_token = #{resetToken,jdbcType=INTEGER},
- `role` = #{role,jdbcType=VARCHAR},
- job = #{job,jdbcType=VARCHAR},
- area = #{area,jdbcType=VARCHAR},
- platform_type = #{platformType,jdbcType=TINYINT},
- account_type = #{accountType,jdbcType=TINYINT},
- account_source = #{accountSource,jdbcType=TINYINT},
- created_at = #{createdAt,jdbcType=TIMESTAMP},
- updated_at = #{updatedAt,jdbcType=TIMESTAMP},
- remark = #{remark,jdbcType=VARCHAR},
- valid_flag = #{validFlag,jdbcType=VARCHAR}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <select id="selectByExampleWithRowbounds" parameterType="cn.kdan.cloud.pdf.office.account.model.UserExample" resultMap="BaseResultMap">
- 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>
- </mapper>
|