|
@@ -1,6 +1,28 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<?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">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
-<mapper namespace="com.shkpr.service.customgateway.zydma.mapper.primary.PersonnelInfoMapper">
|
|
|
|
|
|
|
+<mapper namespace="com.shkpr.service.customgateway.core.mapper.primary.PersonnelInfoMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.shkpr.service.customgateway.core.domain.po.PersonnelInfo">
|
|
|
|
|
+ <id column="uid" property="uid" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="account" property="account" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="password" property="password" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="real_name" property="realName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="address" property="address" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="sex" property="sex" jdbcType="SMALLINT"/>
|
|
|
|
|
+ <result column="phone" property="phone" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="email" property="email" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="avatar" property="avatar" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="role_id" property="roleId" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="dept_id" property="deptId" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="post_id" property="postId" jdbcType="VARCHAR"
|
|
|
|
|
+ typeHandler="com.shkpr.service.customgateway.core.io.StringListTypeHandle"/>
|
|
|
|
|
+ <result column="status" property="status" jdbcType="SMALLINT"/>
|
|
|
|
|
+ <result column="param1" property="param1" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="param2" property="param2" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="org" property="org" jdbcType="VARCHAR"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
<select id="findExistentIds" resultType="java.lang.String">
|
|
<select id="findExistentIds" resultType="java.lang.String">
|
|
|
SELECT uid FROM k2_personnel_info
|
|
SELECT uid FROM k2_personnel_info
|
|
|
WHERE uid IN
|
|
WHERE uid IN
|
|
@@ -8,9 +30,9 @@
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</select>
|
|
</select>
|
|
|
- <select id="findBydUid" resultType="com.shkpr.service.customgateway.zydma.domain.po.PersonnelInfo">
|
|
|
|
|
- select id,
|
|
|
|
|
- uid,
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <select id="findBydUid" resultMap="BaseResultMap">
|
|
|
|
|
+ select uid,
|
|
|
account,
|
|
account,
|
|
|
password,
|
|
password,
|
|
|
real_name,
|
|
real_name,
|
|
@@ -32,6 +54,29 @@
|
|
|
where uid = #{uid,jdbcType=VARCHAR}
|
|
where uid = #{uid,jdbcType=VARCHAR}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="findByAccount" resultMap="BaseResultMap">
|
|
|
|
|
+ select uid,
|
|
|
|
|
+ account,
|
|
|
|
|
+ password,
|
|
|
|
|
+ real_name,
|
|
|
|
|
+ address,
|
|
|
|
|
+ sex,
|
|
|
|
|
+ phone,
|
|
|
|
|
+ email,
|
|
|
|
|
+ avatar,
|
|
|
|
|
+ role_id,
|
|
|
|
|
+ dept_id,
|
|
|
|
|
+ post_id,
|
|
|
|
|
+ status,
|
|
|
|
|
+ param1,
|
|
|
|
|
+ param2,
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ update_time,
|
|
|
|
|
+ org
|
|
|
|
|
+ from k2_personnel_info
|
|
|
|
|
+ where account = #{account,jdbcType=VARCHAR}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<insert id="save">
|
|
<insert id="save">
|
|
|
insert into k2_personnel_info
|
|
insert into k2_personnel_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -42,7 +87,7 @@
|
|
|
<if test="phone != null and phone != ''">phone,</if>
|
|
<if test="phone != null and phone != ''">phone,</if>
|
|
|
<if test="email != null and email != ''">email,</if>
|
|
<if test="email != null and email != ''">email,</if>
|
|
|
<if test="roleId != null and roleId != ''">role_id,</if>
|
|
<if test="roleId != null and roleId != ''">role_id,</if>
|
|
|
- <if test="postId != null and roleId != ''">post_id,</if>
|
|
|
|
|
|
|
+ <if test="postId != null">post_id,</if>
|
|
|
<if test="status != null">status,</if>
|
|
<if test="status != null">status,</if>
|
|
|
<if test="password != null">"password",</if>
|
|
<if test="password != null">"password",</if>
|
|
|
<if test="org != null and org != ''">org,</if>
|
|
<if test="org != null and org != ''">org,</if>
|
|
@@ -56,7 +101,9 @@
|
|
|
<if test="phone != null and phone != ''">#{phone,jdbcType=VARCHAR},</if>
|
|
<if test="phone != null and phone != ''">#{phone,jdbcType=VARCHAR},</if>
|
|
|
<if test="email != null and email != ''">#{email,jdbcType=VARCHAR},</if>
|
|
<if test="email != null and email != ''">#{email,jdbcType=VARCHAR},</if>
|
|
|
<if test="roleId != null and roleId != ''">#{roleId,jdbcType=VARCHAR},</if>
|
|
<if test="roleId != null and roleId != ''">#{roleId,jdbcType=VARCHAR},</if>
|
|
|
- <if test="postId != null and postId != ''">#{postId,jdbcType=VARCHAR},</if>
|
|
|
|
|
|
|
+ <if test="postId != null">
|
|
|
|
|
+ #{postId,jdbcType=VARCHAR,typeHandler=com.shkpr.service.customgateway.core.io.StringListTypeHandle},
|
|
|
|
|
+ </if>
|
|
|
<if test="status != null">#{status,jdbcType=SMALLINT},</if>
|
|
<if test="status != null">#{status,jdbcType=SMALLINT},</if>
|
|
|
<if test="password != null">#{password,jdbcType=VARCHAR},</if>
|
|
<if test="password != null">#{password,jdbcType=VARCHAR},</if>
|
|
|
<if test="org != null and org != ''">#{org,jdbcType=VARCHAR},</if>
|
|
<if test="org != null and org != ''">#{org,jdbcType=VARCHAR},</if>
|
|
@@ -70,7 +117,9 @@
|
|
|
<if test="realName != null and realName != ''">real_name = #{realName,jdbcType=VARCHAR},</if>
|
|
<if test="realName != null and realName != ''">real_name = #{realName,jdbcType=VARCHAR},</if>
|
|
|
<if test="phone != null and phone != ''">phone = #{phone,jdbcType=VARCHAR},</if>
|
|
<if test="phone != null and phone != ''">phone = #{phone,jdbcType=VARCHAR},</if>
|
|
|
<if test="email != null and email != ''">email = #{email,jdbcType=VARCHAR},</if>
|
|
<if test="email != null and email != ''">email = #{email,jdbcType=VARCHAR},</if>
|
|
|
- <if test="postId != null and postId != ''">post_id = #{postId,jdbcType=VARCHAR},</if>
|
|
|
|
|
|
|
+ <if test="postId != null">post_id =
|
|
|
|
|
+ #{postId,jdbcType=VARCHAR,typeHandler=com.shkpr.service.customgateway.core.io.StringListTypeHandle},
|
|
|
|
|
+ </if>
|
|
|
<if test="status != null">status = #{status,jdbcType=SMALLINT},</if>
|
|
<if test="status != null">status = #{status,jdbcType=SMALLINT},</if>
|
|
|
<if test=" password != null">"password" = #{password,jdbcType=VARCHAR},</if>
|
|
<if test=" password != null">"password" = #{password,jdbcType=VARCHAR},</if>
|
|
|
update_time = now()
|
|
update_time = now()
|