|
@@ -17,7 +17,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="labourDivision" column="labour_division" />
|
|
|
<result property="labourEntryTime" column="labour_entry_time" />
|
|
|
<result property="labourLeaveTime" column="labour_leave_time" />
|
|
|
- <result property="contact" column="contact" />
|
|
|
<result property="entryTime" column="entry_time" />
|
|
|
<result property="leaveTime" column="leave_time" />
|
|
|
<result property="isLeague" column="is_league" />
|
|
@@ -33,10 +32,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
+ <result property="nickName" column="nick_name" />
|
|
|
+ <result property="sex" column="sex" />
|
|
|
+ <result property="phonenumber" column="phonenumber" />
|
|
|
+ <result property="ethnic" column="ethnic" />
|
|
|
+ <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
|
+ <collection property="posts" javaType="java.util.List" resultMap="PostResult" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="RoleResult" type="SysRole">
|
|
|
+ <id property="roleId" column="role_id" />
|
|
|
+ <result property="roleName" column="role_name" />
|
|
|
+ <result property="roleKey" column="role_key" />
|
|
|
+ <result property="roleSort" column="role_sort" />
|
|
|
+ <result property="dataScope" column="data_scope" />
|
|
|
+ <result property="status" column="role_status" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="PostResult" type="SysPost">
|
|
|
+ <id property="postId" column="post_id" />
|
|
|
+ <result property="postCode" column="post_code" />
|
|
|
+ <result property="postName" column="post_name" />
|
|
|
+ <result property="postSort" column="post_sort" />
|
|
|
+ <result property="status" column="post_status" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTBranchMemberVo">
|
|
|
- select u.member_id, u.user_id, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.current_post, u.labour_division, u.labour_entry_time, u.labour_leave_time, u.contact, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id from t_branch_member u left join sys_dept d on u.dept_id = d.dept_id
|
|
|
+ select u.member_id, u.user_id, u.ethnic, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, u.current_post, u.labour_division, u.labour_entry_time, u.labour_leave_time, u.entry_time, u.leave_time, u.is_league, u.apply_time, u.form_create_time, u.current_mentor, u.plan_develop_duration, u.is_trained, u.remarks, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id,
|
|
|
+ us.NICK_NAME, us.SEX, us.PHONENUMBER,
|
|
|
+ r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
|
|
|
+ p.post_id, p.post_code, p.post_name, p.post_sort, p.status as post_status
|
|
|
+ from t_branch_member u
|
|
|
+ left join sys_dept d on u.dept_id = d.dept_id
|
|
|
+ left join SYS_USER us on us.user_id = u.user_id
|
|
|
+ left join sys_user_role ur on us.user_id = ur.user_id
|
|
|
+ left join sys_role r on r.role_id = ur.role_id
|
|
|
+ left join sys_user_post up on us.user_id = up.user_id
|
|
|
+ left join sys_post p on p.post_id = up.post_id
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTBranchMemberList" parameterType="TBranchMember" resultMap="TBranchMemberResult">
|
|
@@ -45,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="memberId != null "> and u.member_id = #{memberId}</if>
|
|
|
<if test="userId != null "> and u.user_id = #{userId}</if>
|
|
|
<if test="memberType != null and memberType != ''"> and u.member_type = #{memberType}</if>
|
|
|
+ <if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
|
|
|
<if test="birthday != null "> and u.birthday = #{birthday}</if>
|
|
|
<if test="educationLevel != null and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
|
|
|
<if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
|
|
@@ -54,7 +87,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="labourDivision != null and labourDivision != ''"> and u.labour_division = #{labourDivision}</if>
|
|
|
<if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
|
|
|
<if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
|
|
|
- <if test="contact != null and contact != ''"> and u.contact = #{contact}</if>
|
|
|
<if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
|
|
|
<if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
|
|
|
<if test="isLeague != null and isLeague != ''"> and u.is_league = #{isLeague}</if>
|
|
@@ -78,11 +110,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertTBranchMember" parameterType="TBranchMember">
|
|
|
+ <selectKey keyProperty="memberId" resultType="long" order="BEFORE">
|
|
|
+ SELECT seq_t_branch_member.NEXTVAL as memberId FROM DUAL
|
|
|
+ </selectKey>
|
|
|
insert into t_branch_member
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="memberId != null">member_id,</if>
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
<if test="memberType != null">member_type,</if>
|
|
|
+ <if test="ethnic != null">ethnic,</if>
|
|
|
<if test="birthday != null">birthday,</if>
|
|
|
<if test="educationLevel != null">education_level,</if>
|
|
|
<if test="workJoinTime != null">work_join_time,</if>
|
|
@@ -92,7 +128,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="labourDivision != null">labour_division,</if>
|
|
|
<if test="labourEntryTime != null">labour_entry_time,</if>
|
|
|
<if test="labourLeaveTime != null">labour_leave_time,</if>
|
|
|
- <if test="contact != null">contact,</if>
|
|
|
<if test="entryTime != null">entry_time,</if>
|
|
|
<if test="leaveTime != null">leave_time,</if>
|
|
|
<if test="isLeague != null">is_league,</if>
|
|
@@ -113,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="memberId != null">#{memberId},</if>
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
<if test="memberType != null">#{memberType},</if>
|
|
|
+ <if test="ethnic != null">#{ethnic},</if>
|
|
|
<if test="birthday != null">#{birthday},</if>
|
|
|
<if test="educationLevel != null">#{educationLevel},</if>
|
|
|
<if test="workJoinTime != null">#{workJoinTime},</if>
|
|
@@ -122,7 +158,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="labourDivision != null">#{labourDivision},</if>
|
|
|
<if test="labourEntryTime != null">#{labourEntryTime},</if>
|
|
|
<if test="labourLeaveTime != null">#{labourLeaveTime},</if>
|
|
|
- <if test="contact != null">#{contact},</if>
|
|
|
<if test="entryTime != null">#{entryTime},</if>
|
|
|
<if test="leaveTime != null">#{leaveTime},</if>
|
|
|
<if test="isLeague != null">#{isLeague},</if>
|
|
@@ -146,6 +181,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
|
<if test="memberType != null">member_type = #{memberType},</if>
|
|
|
+ <if test="ethnic != null">ethnic = #{ethnic},</if>
|
|
|
<if test="birthday != null">birthday = #{birthday},</if>
|
|
|
<if test="educationLevel != null">education_level = #{educationLevel},</if>
|
|
|
<if test="workJoinTime != null">work_join_time = #{workJoinTime},</if>
|
|
@@ -155,7 +191,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="labourDivision != null">labour_division = #{labourDivision},</if>
|
|
|
<if test="labourEntryTime != null">labour_entry_time = #{labourEntryTime},</if>
|
|
|
<if test="labourLeaveTime != null">labour_leave_time = #{labourLeaveTime},</if>
|
|
|
- <if test="contact != null">contact = #{contact},</if>
|
|
|
<if test="entryTime != null">entry_time = #{entryTime},</if>
|
|
|
<if test="leaveTime != null">leave_time = #{leaveTime},</if>
|
|
|
<if test="isLeague != null">is_league = #{isLeague},</if>
|