<?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.com.basic.face.discern.baseapi.user.PersonMapper" >
|
<resultMap id="BaseResultMap" type="cn.com.basic.face.discern.user.entity.Person" >
|
<id column="ID" property="id" jdbcType="INTEGER" />
|
<result column="NAME" property="name" jdbcType="VARCHAR" />
|
<result column="nameSpell" property="namespell" jdbcType="CHAR" />
|
<result column="gender" property="gender" jdbcType="BIT" />
|
<result column="country" property="country" jdbcType="CHAR" />
|
<result column="province" property="province" jdbcType="CHAR" />
|
<result column="city" property="city" jdbcType="CHAR" />
|
<result column="birthday" property="birthday" jdbcType="DATE" />
|
<result column="phone" property="phone" jdbcType="CHAR" />
|
<result column="mobilePhone" property="mobilephone" jdbcType="CHAR" />
|
<result column="identityType" property="identitytype" jdbcType="CHAR" />
|
<result column="identify" property="identify" jdbcType="VARCHAR" />
|
<result column="companyID" property="companyid" jdbcType="INTEGER" />
|
<result column="departmentID" property="departmentid" jdbcType="INTEGER" />
|
<result column="postID" property="postid" jdbcType="INTEGER" />
|
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
<result column="warning" property="warning" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
ID, NAME, nameSpell, gender, country, province, city, birthday, phone, mobilePhone,
|
identityType, identify, companyID, departmentID, postID, remark, warning
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
from t_person
|
where ID = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
delete from t_person
|
where ID = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="cn.com.basic.face.discern.user.entity.Person" >
|
<selectKey resultType="java.lang.Integer" keyProperty="id" order="BEFORE" >
|
SELECT LAST_INSERT_ID()
|
</selectKey>
|
insert into t_person (ID, NAME, nameSpell,
|
gender, country, province, city,
|
birthday, phone, mobilePhone,
|
identityType, identify, companyID,
|
departmentID, postID, remark,
|
warning)
|
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{namespell,jdbcType=CHAR},
|
#{gender,jdbcType=BIT}, #{country,jdbcType=CHAR}, #{province,jdbcType=CHAR}, #{city,jdbcType=CHAR},
|
#{birthday,jdbcType=DATE}, #{phone,jdbcType=CHAR}, #{mobilephone,jdbcType=CHAR},
|
#{identitytype,jdbcType=CHAR}, #{identify,jdbcType=VARCHAR}, #{companyid,jdbcType=INTEGER},
|
#{departmentid,jdbcType=INTEGER}, #{postid,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
|
#{warning,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="cn.com.basic.face.discern.user.entity.Person" >
|
<selectKey resultType="java.lang.Integer" keyProperty="id" order="BEFORE" >
|
SELECT LAST_INSERT_ID()
|
</selectKey>
|
insert into t_person
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
ID,
|
<if test="name != null" >
|
NAME,
|
</if>
|
<if test="namespell != null" >
|
nameSpell,
|
</if>
|
<if test="gender != null" >
|
gender,
|
</if>
|
<if test="country != null" >
|
country,
|
</if>
|
<if test="province != null" >
|
province,
|
</if>
|
<if test="city != null" >
|
city,
|
</if>
|
<if test="birthday != null" >
|
birthday,
|
</if>
|
<if test="phone != null" >
|
phone,
|
</if>
|
<if test="mobilephone != null" >
|
mobilePhone,
|
</if>
|
<if test="identitytype != null" >
|
identityType,
|
</if>
|
<if test="identify != null" >
|
identify,
|
</if>
|
<if test="companyid != null" >
|
companyID,
|
</if>
|
<if test="departmentid != null" >
|
departmentID,
|
</if>
|
<if test="postid != null" >
|
postID,
|
</if>
|
<if test="remark != null" >
|
remark,
|
</if>
|
<if test="warning != null" >
|
warning,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
#{id,jdbcType=INTEGER},
|
<if test="name != null" >
|
#{name,jdbcType=VARCHAR},
|
</if>
|
<if test="namespell != null" >
|
#{namespell,jdbcType=CHAR},
|
</if>
|
<if test="gender != null" >
|
#{gender,jdbcType=BIT},
|
</if>
|
<if test="country != null" >
|
#{country,jdbcType=CHAR},
|
</if>
|
<if test="province != null" >
|
#{province,jdbcType=CHAR},
|
</if>
|
<if test="city != null" >
|
#{city,jdbcType=CHAR},
|
</if>
|
<if test="birthday != null" >
|
#{birthday,jdbcType=DATE},
|
</if>
|
<if test="phone != null" >
|
#{phone,jdbcType=CHAR},
|
</if>
|
<if test="mobilephone != null" >
|
#{mobilephone,jdbcType=CHAR},
|
</if>
|
<if test="identitytype != null" >
|
#{identitytype,jdbcType=CHAR},
|
</if>
|
<if test="identify != null" >
|
#{identify,jdbcType=VARCHAR},
|
</if>
|
<if test="companyid != null" >
|
#{companyid,jdbcType=INTEGER},
|
</if>
|
<if test="departmentid != null" >
|
#{departmentid,jdbcType=INTEGER},
|
</if>
|
<if test="postid != null" >
|
#{postid,jdbcType=INTEGER},
|
</if>
|
<if test="remark != null" >
|
#{remark,jdbcType=VARCHAR},
|
</if>
|
<if test="warning != null" >
|
#{warning,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="cn.com.basic.face.discern.user.entity.Person" >
|
update t_person
|
<set >
|
<if test="name != null" >
|
NAME = #{name,jdbcType=VARCHAR},
|
</if>
|
<if test="namespell != null" >
|
nameSpell = #{namespell,jdbcType=CHAR},
|
</if>
|
<if test="gender != null" >
|
gender = #{gender,jdbcType=BIT},
|
</if>
|
<if test="country != null" >
|
country = #{country,jdbcType=CHAR},
|
</if>
|
<if test="province != null" >
|
province = #{province,jdbcType=CHAR},
|
</if>
|
<if test="city != null" >
|
city = #{city,jdbcType=CHAR},
|
</if>
|
<if test="birthday != null" >
|
birthday = #{birthday,jdbcType=DATE},
|
</if>
|
<if test="phone != null" >
|
phone = #{phone,jdbcType=CHAR},
|
</if>
|
<if test="mobilephone != null" >
|
mobilePhone = #{mobilephone,jdbcType=CHAR},
|
</if>
|
<if test="identitytype != null" >
|
identityType = #{identitytype,jdbcType=CHAR},
|
</if>
|
<if test="identify != null" >
|
identify = #{identify,jdbcType=VARCHAR},
|
</if>
|
<if test="companyid != null" >
|
companyID = #{companyid,jdbcType=INTEGER},
|
</if>
|
<if test="departmentid != null" >
|
departmentID = #{departmentid,jdbcType=INTEGER},
|
</if>
|
<if test="postid != null" >
|
postID = #{postid,jdbcType=INTEGER},
|
</if>
|
<if test="remark != null" >
|
remark = #{remark,jdbcType=VARCHAR},
|
</if>
|
<if test="warning != null" >
|
warning = #{warning,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where ID = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="cn.com.basic.face.discern.user.entity.Person" >
|
update t_person
|
set NAME = #{name,jdbcType=VARCHAR},
|
nameSpell = #{namespell,jdbcType=CHAR},
|
gender = #{gender,jdbcType=BIT},
|
country = #{country,jdbcType=CHAR},
|
province = #{province,jdbcType=CHAR},
|
city = #{city,jdbcType=CHAR},
|
birthday = #{birthday,jdbcType=DATE},
|
phone = #{phone,jdbcType=CHAR},
|
mobilePhone = #{mobilephone,jdbcType=CHAR},
|
identityType = #{identitytype,jdbcType=CHAR},
|
identify = #{identify,jdbcType=VARCHAR},
|
companyID = #{companyid,jdbcType=INTEGER},
|
departmentID = #{departmentid,jdbcType=INTEGER},
|
postID = #{postid,jdbcType=INTEGER},
|
remark = #{remark,jdbcType=VARCHAR},
|
warning = #{warning,jdbcType=VARCHAR}
|
where ID = #{id,jdbcType=INTEGER}
|
</update>
|
</mapper>
|