|
|
<?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.yoho.unions.dal.IProfileDAO">
|
|
|
<resultMap id="BaseResultMap"
|
|
|
type="com.yoho.unions.dal.model.Profile">
|
|
|
<id column="pid" property="pid" jdbcType="INTEGER" />
|
|
|
<result column="account" property="account" jdbcType="VARCHAR" />
|
|
|
<result column="truename" property="truename" jdbcType="VARCHAR" />
|
|
|
<result column="staff_code" property="staffCode" jdbcType="VARCHAR" />
|
|
|
<result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
<result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
<result column="phone" property="phone" jdbcType="VARCHAR" />
|
|
|
<result column="create_time" property="createTime" jdbcType="INTEGER" />
|
|
|
<result column="expires" property="expires" jdbcType="INTEGER" />
|
|
|
<result column="login_time" property="loginTime" jdbcType="INTEGER" />
|
|
|
<result column="status" property="status" jdbcType="TINYINT" />
|
|
|
<result column="identity" property="identity" jdbcType="TINYINT" />
|
|
|
<result column="auth_site" property="authSite" jdbcType="VARCHAR" />
|
|
|
<result column="role_id" property="roleId" jdbcType="INTEGER" />
|
|
|
<result column="dept_id" property="deptId" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
pid, account, truename, staff_code, email, password, phone, create_time,
|
|
|
expires,
|
|
|
login_time, status, identity, auth_site, role_id, dept_id
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
|
|
parameterType="java.lang.Integer">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from profile
|
|
|
where pid = #{pid,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from profile
|
|
|
where pid = #{pid,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
insert into profile (pid, account, truename,
|
|
|
staff_code, email, password,
|
|
|
phone, create_time, expires,
|
|
|
login_time, status, identity,
|
|
|
auth_site)
|
|
|
values (#{pid,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR},
|
|
|
#{truename,jdbcType=VARCHAR},
|
|
|
#{staffCode,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
#{phone,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER},
|
|
|
#{expires,jdbcType=INTEGER},
|
|
|
#{loginTime,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, #{identity,jdbcType=TINYINT},
|
|
|
#{authSite,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
insert into profile
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="pid != null">
|
|
|
pid,
|
|
|
</if>
|
|
|
<if test="account != null">
|
|
|
account,
|
|
|
</if>
|
|
|
<if test="truename != null">
|
|
|
truename,
|
|
|
</if>
|
|
|
<if test="staffCode != null">
|
|
|
staff_code,
|
|
|
</if>
|
|
|
<if test="email != null">
|
|
|
email,
|
|
|
</if>
|
|
|
<if test="password != null">
|
|
|
password,
|
|
|
</if>
|
|
|
<if test="phone != null">
|
|
|
phone,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time,
|
|
|
</if>
|
|
|
<if test="expires != null">
|
|
|
expires,
|
|
|
</if>
|
|
|
<if test="loginTime != null">
|
|
|
login_time,
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status,
|
|
|
</if>
|
|
|
<if test="identity != null">
|
|
|
identity,
|
|
|
</if>
|
|
|
<if test="authSite != null">
|
|
|
auth_site,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="pid != null">
|
|
|
#{pid,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="account != null">
|
|
|
#{account,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="truename != null">
|
|
|
#{truename,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="staffCode != null">
|
|
|
#{staffCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="email != null">
|
|
|
#{email,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="password != null">
|
|
|
#{password,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="phone != null">
|
|
|
#{phone,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="expires != null">
|
|
|
#{expires,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="loginTime != null">
|
|
|
#{loginTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
#{status,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="identity != null">
|
|
|
#{identity,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="authSite != null">
|
|
|
#{authSite,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
update profile
|
|
|
<set>
|
|
|
<if test="account != null">
|
|
|
account = #{account,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="truename != null">
|
|
|
truename = #{truename,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="staffCode != null">
|
|
|
staff_code = #{staffCode,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="email != null">
|
|
|
email = #{email,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="password != null">
|
|
|
password = #{password,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="phone != null">
|
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="expires != null">
|
|
|
expires = #{expires,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="loginTime != null">
|
|
|
login_time = #{loginTime,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status = #{status,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="identity != null">
|
|
|
identity = #{identity,jdbcType=TINYINT},
|
|
|
</if>
|
|
|
<if test="authSite != null">
|
|
|
auth_site = #{authSite,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where pid = #{pid,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
update profile
|
|
|
set account = #{account,jdbcType=VARCHAR},
|
|
|
truename = #{truename,jdbcType=VARCHAR},
|
|
|
staff_code = #{staffCode,jdbcType=VARCHAR},
|
|
|
email = #{email,jdbcType=VARCHAR},
|
|
|
password = #{password,jdbcType=VARCHAR},
|
|
|
phone = #{phone,jdbcType=VARCHAR},
|
|
|
create_time = #{createTime,jdbcType=INTEGER},
|
|
|
expires = #{expires,jdbcType=INTEGER},
|
|
|
login_time = #{loginTime,jdbcType=INTEGER},
|
|
|
status = #{status,jdbcType=TINYINT},
|
|
|
identity = #{identity,jdbcType=TINYINT},
|
|
|
auth_site = #{authSite,jdbcType=VARCHAR}
|
|
|
where pid = #{pid,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="batchSelectByPrimaryKey" resultMap="BaseResultMap"
|
|
|
parameterType="java.util.List" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from profile
|
|
|
where pid in
|
|
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</select>
|
|
|
</mapper> |
|
|
\ No newline at end of file |
...
|
...
|
|