123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <?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.bowintek.smartsearch.mapper.SysUserMapper">
- <resultMap id="BaseResultMap" type="com.bowintek.smartsearch.model.SysUser">
- <id column="UserID" jdbcType="VARCHAR" property="userID" />
- <result column="UserTypeID" jdbcType="INTEGER" property="userTypeID" />
- <result column="LoginID" jdbcType="VARCHAR" property="loginID" />
- <result column="Password" jdbcType="VARCHAR" property="password" />
- <result column="Name" jdbcType="VARCHAR" property="name" />
- <result column="RecordStatus" jdbcType="INTEGER" property="recordStatus" />
- <result column="CreateBy" jdbcType="VARCHAR" property="createBy" />
- <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
- <result column="UpdateBy" jdbcType="VARCHAR" property="updateBy" />
- <result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime" />
- </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">
- UserID, UserTypeID, LoginID, Password, Name, RecordStatus, CreateBy, CreateTime,
- UpdateBy, UpdateTime
- </sql>
- <select id="selectByExample" parameterType="com.bowintek.smartsearch.model.SysUserExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from sys_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 sys_user
- where UserID = #{userID,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from sys_user
- where UserID = #{userID,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.bowintek.smartsearch.model.SysUserExample">
- delete from sys_user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.bowintek.smartsearch.model.SysUser">
- insert into sys_user (UserID, UserTypeID, LoginID,
- Password, Name, RecordStatus,
- CreateBy, CreateTime, UpdateBy,
- UpdateTime)
- values (#{userID,jdbcType=VARCHAR}, #{userTypeID,jdbcType=INTEGER}, #{loginID,jdbcType=VARCHAR},
- #{password,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{recordStatus,jdbcType=INTEGER},
- #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
- #{updateTime,jdbcType=TIMESTAMP})
- </insert>
- <insert id="insertSelective" parameterType="com.bowintek.smartsearch.model.SysUser">
- insert into sys_user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="userID != null">
- UserID,
- </if>
- <if test="userTypeID != null">
- UserTypeID,
- </if>
- <if test="loginID != null">
- LoginID,
- </if>
- <if test="password != null">
- Password,
- </if>
- <if test="name != null">
- Name,
- </if>
- <if test="recordStatus != null">
- RecordStatus,
- </if>
- <if test="createBy != null">
- CreateBy,
- </if>
- <if test="createTime != null">
- CreateTime,
- </if>
- <if test="updateBy != null">
- UpdateBy,
- </if>
- <if test="updateTime != null">
- UpdateTime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="userID != null">
- #{userID,jdbcType=VARCHAR},
- </if>
- <if test="userTypeID != null">
- #{userTypeID,jdbcType=INTEGER},
- </if>
- <if test="loginID != null">
- #{loginID,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- #{password,jdbcType=VARCHAR},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="recordStatus != null">
- #{recordStatus,jdbcType=INTEGER},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.bowintek.smartsearch.model.SysUserExample" resultType="java.lang.Long">
- select count(*) from sys_user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update sys_user
- <set>
- <if test="row.userID != null">
- UserID = #{row.userID,jdbcType=VARCHAR},
- </if>
- <if test="row.userTypeID != null">
- UserTypeID = #{row.userTypeID,jdbcType=INTEGER},
- </if>
- <if test="row.loginID != null">
- LoginID = #{row.loginID,jdbcType=VARCHAR},
- </if>
- <if test="row.password != null">
- Password = #{row.password,jdbcType=VARCHAR},
- </if>
- <if test="row.name != null">
- Name = #{row.name,jdbcType=VARCHAR},
- </if>
- <if test="row.recordStatus != null">
- RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
- </if>
- <if test="row.createBy != null">
- CreateBy = #{row.createBy,jdbcType=VARCHAR},
- </if>
- <if test="row.createTime != null">
- CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="row.updateBy != null">
- UpdateBy = #{row.updateBy,jdbcType=VARCHAR},
- </if>
- <if test="row.updateTime != null">
- UpdateTime = #{row.updateTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- <if test="example != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update sys_user
- set UserID = #{row.userID,jdbcType=VARCHAR},
- UserTypeID = #{row.userTypeID,jdbcType=INTEGER},
- LoginID = #{row.loginID,jdbcType=VARCHAR},
- Password = #{row.password,jdbcType=VARCHAR},
- Name = #{row.name,jdbcType=VARCHAR},
- RecordStatus = #{row.recordStatus,jdbcType=INTEGER},
- CreateBy = #{row.createBy,jdbcType=VARCHAR},
- CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
- UpdateBy = #{row.updateBy,jdbcType=VARCHAR},
- UpdateTime = #{row.updateTime,jdbcType=TIMESTAMP}
- <if test="example != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.bowintek.smartsearch.model.SysUser">
- update sys_user
- <set>
- <if test="userTypeID != null">
- UserTypeID = #{userTypeID,jdbcType=INTEGER},
- </if>
- <if test="loginID != null">
- LoginID = #{loginID,jdbcType=VARCHAR},
- </if>
- <if test="password != null">
- Password = #{password,jdbcType=VARCHAR},
- </if>
- <if test="name != null">
- Name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="recordStatus != null">
- RecordStatus = #{recordStatus,jdbcType=INTEGER},
- </if>
- <if test="createBy != null">
- CreateBy = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- CreateTime = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- UpdateBy = #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- UpdateTime = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where UserID = #{userID,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.bowintek.smartsearch.model.SysUser">
- update sys_user
- set UserTypeID = #{userTypeID,jdbcType=INTEGER},
- LoginID = #{loginID,jdbcType=VARCHAR},
- Password = #{password,jdbcType=VARCHAR},
- Name = #{name,jdbcType=VARCHAR},
- RecordStatus = #{recordStatus,jdbcType=INTEGER},
- CreateBy = #{createBy,jdbcType=VARCHAR},
- CreateTime = #{createTime,jdbcType=TIMESTAMP},
- UpdateBy = #{updateBy,jdbcType=VARCHAR},
- UpdateTime = #{updateTime,jdbcType=TIMESTAMP}
- where UserID = #{userID,jdbcType=VARCHAR}
- </update>
- </mapper>
|