123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- <?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.hz.employmentsite.mapper.PcSiteUserMapper">
- <resultMap id="BaseResultMap" type="com.hz.employmentsite.model.PcSiteUser">
- <id column="SiteUserID" jdbcType="VARCHAR" property="siteUserID" />
- <result column="SiteUserName" jdbcType="VARCHAR" property="siteUserName" />
- <result column="UserID" jdbcType="VARCHAR" property="userID" />
- <result column="SiteID" jdbcType="VARCHAR" property="siteID" />
- <result column="Gender" jdbcType="INTEGER" property="gender" />
- <result column="Mobile" jdbcType="VARCHAR" property="mobile" />
- <result column="RoleID" jdbcType="INTEGER" property="roleID" />
- <result column="CreateUserID" jdbcType="VARCHAR" property="createUserID" />
- <result column="CreateTime" jdbcType="TIMESTAMP" property="createTime" />
- <result column="UpdateBy" jdbcType="VARCHAR" property="updateBy" />
- <result column="UpdateTime" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="UserNo" jdbcType="VARCHAR" property="userNo" />
- <result column="IDCard" jdbcType="VARCHAR" property="IDCard" />
- </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">
- SiteUserID, SiteUserName, UserID, SiteID, Gender, Mobile, RoleID, CreateUserID, CreateTime,
- UpdateBy, UpdateTime, UserNo, IDCard
- </sql>
- <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcSiteUserExample" resultMap="BaseResultMap">
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from pc_site_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 pc_site_user
- where SiteUserID = #{siteUserID,jdbcType=VARCHAR}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from pc_site_user
- where SiteUserID = #{siteUserID,jdbcType=VARCHAR}
- </delete>
- <delete id="deleteByExample" parameterType="com.hz.employmentsite.model.PcSiteUserExample">
- delete from pc_site_user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.hz.employmentsite.model.PcSiteUser">
- insert into pc_site_user (SiteUserID, SiteUserName, UserID,
- SiteID, Gender, Mobile,
- RoleID, CreateUserID, CreateTime,
- UpdateBy, UpdateTime, UserNo,
- IDCard)
- values (#{siteUserID,jdbcType=VARCHAR}, #{siteUserName,jdbcType=VARCHAR}, #{userID,jdbcType=VARCHAR},
- #{siteID,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR},
- #{roleID,jdbcType=INTEGER}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{userNo,jdbcType=VARCHAR},
- #{IDCard,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcSiteUser">
- insert into pc_site_user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="siteUserID != null">
- SiteUserID,
- </if>
- <if test="siteUserName != null">
- SiteUserName,
- </if>
- <if test="userID != null">
- UserID,
- </if>
- <if test="siteID != null">
- SiteID,
- </if>
- <if test="gender != null">
- Gender,
- </if>
- <if test="mobile != null">
- Mobile,
- </if>
- <if test="roleID != null">
- RoleID,
- </if>
- <if test="createUserID != null">
- CreateUserID,
- </if>
- <if test="createTime != null">
- CreateTime,
- </if>
- <if test="updateBy != null">
- UpdateBy,
- </if>
- <if test="updateTime != null">
- UpdateTime,
- </if>
- <if test="userNo != null">
- UserNo,
- </if>
- <if test="IDCard != null">
- IDCard,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="siteUserID != null">
- #{siteUserID,jdbcType=VARCHAR},
- </if>
- <if test="siteUserName != null">
- #{siteUserName,jdbcType=VARCHAR},
- </if>
- <if test="userID != null">
- #{userID,jdbcType=VARCHAR},
- </if>
- <if test="siteID != null">
- #{siteID,jdbcType=VARCHAR},
- </if>
- <if test="gender != null">
- #{gender,jdbcType=INTEGER},
- </if>
- <if test="mobile != null">
- #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="roleID != null">
- #{roleID,jdbcType=INTEGER},
- </if>
- <if test="createUserID != null">
- #{createUserID,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>
- <if test="userNo != null">
- #{userNo,jdbcType=VARCHAR},
- </if>
- <if test="IDCard != null">
- #{IDCard,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.hz.employmentsite.model.PcSiteUserExample" resultType="java.lang.Long">
- select count(*) from pc_site_user
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- update pc_site_user
- <set>
- <if test="row.siteUserID != null">
- SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
- </if>
- <if test="row.siteUserName != null">
- SiteUserName = #{row.siteUserName,jdbcType=VARCHAR},
- </if>
- <if test="row.userID != null">
- UserID = #{row.userID,jdbcType=VARCHAR},
- </if>
- <if test="row.siteID != null">
- SiteID = #{row.siteID,jdbcType=VARCHAR},
- </if>
- <if test="row.gender != null">
- Gender = #{row.gender,jdbcType=INTEGER},
- </if>
- <if test="row.mobile != null">
- Mobile = #{row.mobile,jdbcType=VARCHAR},
- </if>
- <if test="row.roleID != null">
- RoleID = #{row.roleID,jdbcType=INTEGER},
- </if>
- <if test="row.createUserID != null">
- CreateUserID = #{row.createUserID,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>
- <if test="row.userNo != null">
- UserNo = #{row.userNo,jdbcType=VARCHAR},
- </if>
- <if test="row.IDCard != null">
- IDCard = #{row.IDCard,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="example != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByExample" parameterType="map">
- update pc_site_user
- set SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
- SiteUserName = #{row.siteUserName,jdbcType=VARCHAR},
- UserID = #{row.userID,jdbcType=VARCHAR},
- SiteID = #{row.siteID,jdbcType=VARCHAR},
- Gender = #{row.gender,jdbcType=INTEGER},
- Mobile = #{row.mobile,jdbcType=VARCHAR},
- RoleID = #{row.roleID,jdbcType=INTEGER},
- CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
- CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
- UpdateBy = #{row.updateBy,jdbcType=VARCHAR},
- UpdateTime = #{row.updateTime,jdbcType=TIMESTAMP},
- UserNo = #{row.userNo,jdbcType=VARCHAR},
- IDCard = #{row.IDCard,jdbcType=VARCHAR}
- <if test="example != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.hz.employmentsite.model.PcSiteUser">
- update pc_site_user
- <set>
- <if test="siteUserName != null">
- SiteUserName = #{siteUserName,jdbcType=VARCHAR},
- </if>
- <if test="userID != null">
- UserID = #{userID,jdbcType=VARCHAR},
- </if>
- <if test="siteID != null">
- SiteID = #{siteID,jdbcType=VARCHAR},
- </if>
- <if test="gender != null">
- Gender = #{gender,jdbcType=INTEGER},
- </if>
- <if test="mobile != null">
- Mobile = #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="roleID != null">
- RoleID = #{roleID,jdbcType=INTEGER},
- </if>
- <if test="createUserID != null">
- CreateUserID = #{createUserID,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>
- <if test="userNo != null">
- UserNo = #{userNo,jdbcType=VARCHAR},
- </if>
- <if test="IDCard != null">
- IDCard = #{IDCard,jdbcType=VARCHAR},
- </if>
- </set>
- where SiteUserID = #{siteUserID,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcSiteUser">
- update pc_site_user
- set SiteUserName = #{siteUserName,jdbcType=VARCHAR},
- UserID = #{userID,jdbcType=VARCHAR},
- SiteID = #{siteID,jdbcType=VARCHAR},
- Gender = #{gender,jdbcType=INTEGER},
- Mobile = #{mobile,jdbcType=VARCHAR},
- RoleID = #{roleID,jdbcType=INTEGER},
- CreateUserID = #{createUserID,jdbcType=VARCHAR},
- CreateTime = #{createTime,jdbcType=TIMESTAMP},
- UpdateBy = #{updateBy,jdbcType=VARCHAR},
- UpdateTime = #{updateTime,jdbcType=TIMESTAMP},
- UserNo = #{userNo,jdbcType=VARCHAR},
- IDCard = #{IDCard,jdbcType=VARCHAR}
- where SiteUserID = #{siteUserID,jdbcType=VARCHAR}
- </update>
- <select id="selectByMobile" resultType="String">
- select SiteID
- from pc_site_user
- where mobile = #{mobile,jdbcType=VARCHAR}
- </select>
- </mapper>
|