| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475 |
- <?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.TbUserMapper">
- <resultMap id="BaseResultMap" type="com.js.kbt.model.TbUser">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="account" jdbcType="VARCHAR" property="account" />
- <result column="username" jdbcType="VARCHAR" property="username" />
- <result column="password" jdbcType="VARCHAR" property="password" />
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
- <result column="role_type" jdbcType="INTEGER" property="roleType" />
- <result column="company_id" jdbcType="INTEGER" property="companyId" />
- <result column="parent_id" jdbcType="INTEGER" property="parentId" />
- <result column="sex" jdbcType="INTEGER" property="sex" />
- <result column="role_name" jdbcType="VARCHAR" property="roleName" />
- <result column="work_state" jdbcType="INTEGER" property="workState" />
- <result column="is_disable" jdbcType="INTEGER" property="isDisable" />
- <result column="indate" jdbcType="TIMESTAMP" property="indate" />
- <result column="head_imgurl" jdbcType="VARCHAR" property="headImgurl" />
- <result column="team_name" jdbcType="VARCHAR" property="teamName" />
- <result column="subordinate_type" jdbcType="INTEGER" property="subordinateType" />
- <result column="openid" jdbcType="VARCHAR" property="openid" />
- </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 Thu Aug 08 16:22:07 CST 2019.
- -->
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- id, account, username, password, mobile, role_type, company_id, parent_id, sex, role_name,
- work_state, is_disable, indate, head_imgurl, team_name, subordinate_type, openid
- </sql>
- <select id="selectByExample" parameterType="com.js.kbt.model.TbUserExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from tb_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 - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- select
- <include refid="Base_Column_List" />
- from tb_user
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- delete from tb_user
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.js.kbt.model.TbUserExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- delete from tb_user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.js.kbt.model.TbUser">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into tb_user (account, username, password,
- mobile, role_type, company_id,
- parent_id, sex, role_name,
- work_state, is_disable, indate,
- head_imgurl, team_name, subordinate_type,
- openid)
- values (#{account,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
- #{mobile,jdbcType=VARCHAR}, #{roleType,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER},
- #{parentId,jdbcType=INTEGER}, #{sex,jdbcType=INTEGER}, #{roleName,jdbcType=VARCHAR},
- #{workState,jdbcType=INTEGER}, #{isDisable,jdbcType=INTEGER}, #{indate,jdbcType=TIMESTAMP},
- #{headImgurl,jdbcType=VARCHAR}, #{teamName,jdbcType=VARCHAR}, #{subordinateType,jdbcType=INTEGER},
- #{openid,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.js.kbt.model.TbUser">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
- SELECT LAST_INSERT_ID()
- </selectKey>
- insert into tb_user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="account != null">
- account,
- </if>
- <if test="username != null">
- username,
- </if>
- <if test="password != null">
- password,
- </if>
- <if test="mobile != null">
- mobile,
- </if>
- <if test="roleType != null">
- role_type,
- </if>
- <if test="companyId != null">
- company_id,
- </if>
- <if test="parentId != null">
- parent_id,
- </if>
- <if test="sex != null">
- sex,
- </if>
- <if test="roleName != null">
- role_name,
- </if>
- <if test="workState != null">
- work_state,
- </if>
- <if test="isDisable != null">
- is_disable,
- </if>
- <if test="indate != null">
- indate,
- </if>
- <if test="headImgurl != null">
- head_imgurl,
- </if>
- <if test="teamName != null">
- team_name,
- </if>
- <if test="subordinateType != null">
- subordinate_type,
- </if>
- <if test="openid != null">
- openid,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="account != null">
- #{account,jdbcType=VARCHAR},
- </if>
- <if test="username != null">
- #{username,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="mobile != null">
- #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="roleType != null">
- #{roleType,jdbcType=INTEGER},
- </if>
- <if test="companyId != null">
- #{companyId,jdbcType=INTEGER},
- </if>
- <if test="parentId != null">
- #{parentId,jdbcType=INTEGER},
- </if>
- <if test="sex != null">
- #{sex,jdbcType=INTEGER},
- </if>
- <if test="roleName != null">
- #{roleName,jdbcType=VARCHAR},
- </if>
- <if test="workState != null">
- #{workState,jdbcType=INTEGER},
- </if>
- <if test="isDisable != null">
- #{isDisable,jdbcType=INTEGER},
- </if>
- <if test="indate != null">
- #{indate,jdbcType=TIMESTAMP},
- </if>
- <if test="headImgurl != null">
- #{headImgurl,jdbcType=VARCHAR},
- </if>
- <if test="teamName != null">
- #{teamName,jdbcType=VARCHAR},
- </if>
- <if test="subordinateType != null">
- #{subordinateType,jdbcType=INTEGER},
- </if>
- <if test="openid != null">
- #{openid,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.js.kbt.model.TbUserExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- select count(*) from tb_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 Thu Aug 08 16:22:07 CST 2019.
- -->
- update tb_user
- <set>
- <if test="record.id != null">
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.account != null">
- account = #{record.account,jdbcType=VARCHAR},
- </if>
- <if test="record.username != null">
- username = #{record.username,jdbcType=VARCHAR},
- </if>
- <if test="record.password != null">
- password = #{record.password,jdbcType=VARCHAR},
- </if>
- <if test="record.mobile != null">
- mobile = #{record.mobile,jdbcType=VARCHAR},
- </if>
- <if test="record.roleType != null">
- role_type = #{record.roleType,jdbcType=INTEGER},
- </if>
- <if test="record.companyId != null">
- company_id = #{record.companyId,jdbcType=INTEGER},
- </if>
- <if test="record.parentId != null">
- parent_id = #{record.parentId,jdbcType=INTEGER},
- </if>
- <if test="record.sex != null">
- sex = #{record.sex,jdbcType=INTEGER},
- </if>
- <if test="record.roleName != null">
- role_name = #{record.roleName,jdbcType=VARCHAR},
- </if>
- <if test="record.workState != null">
- work_state = #{record.workState,jdbcType=INTEGER},
- </if>
- <if test="record.isDisable != null">
- is_disable = #{record.isDisable,jdbcType=INTEGER},
- </if>
- <if test="record.indate != null">
- indate = #{record.indate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.headImgurl != null">
- head_imgurl = #{record.headImgurl,jdbcType=VARCHAR},
- </if>
- <if test="record.teamName != null">
- team_name = #{record.teamName,jdbcType=VARCHAR},
- </if>
- <if test="record.subordinateType != null">
- subordinate_type = #{record.subordinateType,jdbcType=INTEGER},
- </if>
- <if test="record.openid != null">
- openid = #{record.openid,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- update tb_user
- set id = #{record.id,jdbcType=INTEGER},
- account = #{record.account,jdbcType=VARCHAR},
- username = #{record.username,jdbcType=VARCHAR},
- password = #{record.password,jdbcType=VARCHAR},
- mobile = #{record.mobile,jdbcType=VARCHAR},
- role_type = #{record.roleType,jdbcType=INTEGER},
- company_id = #{record.companyId,jdbcType=INTEGER},
- parent_id = #{record.parentId,jdbcType=INTEGER},
- sex = #{record.sex,jdbcType=INTEGER},
- role_name = #{record.roleName,jdbcType=VARCHAR},
- work_state = #{record.workState,jdbcType=INTEGER},
- is_disable = #{record.isDisable,jdbcType=INTEGER},
- indate = #{record.indate,jdbcType=TIMESTAMP},
- head_imgurl = #{record.headImgurl,jdbcType=VARCHAR},
- team_name = #{record.teamName,jdbcType=VARCHAR},
- subordinate_type = #{record.subordinateType,jdbcType=INTEGER},
- openid = #{record.openid,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.js.kbt.model.TbUser">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- update tb_user
- <set>
- <if test="account != null">
- account = #{account,jdbcType=VARCHAR},
- </if>
- <if test="username != null">
- username = #{username,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- password = #{password,jdbcType=VARCHAR},
- </if>
- <if test="mobile != null">
- mobile = #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="roleType != null">
- role_type = #{roleType,jdbcType=INTEGER},
- </if>
- <if test="companyId != null">
- company_id = #{companyId,jdbcType=INTEGER},
- </if>
- <if test="parentId != null">
- parent_id = #{parentId,jdbcType=INTEGER},
- </if>
- <if test="sex != null">
- sex = #{sex,jdbcType=INTEGER},
- </if>
- <if test="roleName != null">
- role_name = #{roleName,jdbcType=VARCHAR},
- </if>
- <if test="workState != null">
- work_state = #{workState,jdbcType=INTEGER},
- </if>
- <if test="isDisable != null">
- is_disable = #{isDisable,jdbcType=INTEGER},
- </if>
- <if test="indate != null">
- indate = #{indate,jdbcType=TIMESTAMP},
- </if>
- <if test="headImgurl != null">
- head_imgurl = #{headImgurl,jdbcType=VARCHAR},
- </if>
- <if test="teamName != null">
- team_name = #{teamName,jdbcType=VARCHAR},
- </if>
- <if test="subordinateType != null">
- subordinate_type = #{subordinateType,jdbcType=INTEGER},
- </if>
- <if test="openid != null">
- openid = #{openid,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.js.kbt.model.TbUser">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Thu Aug 08 16:22:07 CST 2019.
- -->
- update tb_user
- set account = #{account,jdbcType=VARCHAR},
- username = #{username,jdbcType=VARCHAR},
- password = #{password,jdbcType=VARCHAR},
- mobile = #{mobile,jdbcType=VARCHAR},
- role_type = #{roleType,jdbcType=INTEGER},
- company_id = #{companyId,jdbcType=INTEGER},
- parent_id = #{parentId,jdbcType=INTEGER},
- sex = #{sex,jdbcType=INTEGER},
- role_name = #{roleName,jdbcType=VARCHAR},
- work_state = #{workState,jdbcType=INTEGER},
- is_disable = #{isDisable,jdbcType=INTEGER},
- indate = #{indate,jdbcType=TIMESTAMP},
- head_imgurl = #{headImgurl,jdbcType=VARCHAR},
- team_name = #{teamName,jdbcType=VARCHAR},
- subordinate_type = #{subordinateType,jdbcType=INTEGER},
- openid = #{openid,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|