TBranchMemberMapper.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.branch.mapper.TBranchMemberMapper">
  6. <resultMap type="TBranchMember" id="TBranchMemberResult">
  7. <result property="memberId" column="member_id" />
  8. <result property="userId" column="user_id" />
  9. <result property="memberType" column="member_type" />
  10. <result property="birthday" column="birthday" />
  11. <result property="educationLevel" column="education_level" />
  12. <result property="workJoinTime" column="work_join_time" />
  13. <result property="workEntryTime" column="work_entry_time" />
  14. <result property="partyEntryTime" column="party_entry_time" />
  15. <result property="labourEntryTime" column="labour_entry_time" />
  16. <result property="labourLeaveTime" column="labour_leave_time" />
  17. <result property="entryTime" column="entry_time" />
  18. <result property="leaveTime" column="leave_time" />
  19. <result property="isLeague" column="is_league" />
  20. <result property="applyTime" column="apply_time" />
  21. <result property="formCreateTime" column="form_create_time" />
  22. <result property="currentMentor" column="current_mentor" />
  23. <result property="planDevelopDuration" column="plan_develop_duration" />
  24. <result property="isTrained" column="is_trained" />
  25. <result property="remarks" column="remarks" />
  26. <result property="delFlag" column="del_flag" />
  27. <result property="createBy" column="create_by" />
  28. <result property="createTime" column="create_time" />
  29. <result property="updateBy" column="update_by" />
  30. <result property="updateTime" column="update_time" />
  31. <result property="deptId" column="dept_id" />
  32. <result property="deptName" column="dept_name" />
  33. <result property="nickName" column="nick_name" />
  34. <result property="sex" column="sex" />
  35. <result property="phonenumber" column="phonenumber" />
  36. <result property="ethnic" column="ethnic" />
  37. <result property="staffId" column="staff_id" />
  38. <result property="newDeptId" column="new_dept_id" />
  39. <result property="oldDeptId" column="old_dept_id" />
  40. <result property="apStatus" column="ap_status" />
  41. <result property="apNo" column="ap_no" />
  42. <result property="processId" column="process_id" />
  43. <result property="photo" column="photo" />
  44. <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
  45. <collection property="posts" javaType="java.util.List" resultMap="PostResult" />
  46. </resultMap>
  47. <resultMap type="TBranchWyhVo" id="TBranchWyhResult">
  48. <result property="birthday" column="birthday" />
  49. <result property="educationLevel" column="education_level" />
  50. <result property="workEntryTime" column="work_entry_time" />
  51. <result property="partyEntryTime" column="party_entry_time" />
  52. <result property="labourEntryTime" column="labour_entry_time" />
  53. <result property="labourLeaveTime" column="labour_leave_time" />
  54. <result property="remarks" column="remarks" />
  55. <result property="deptName" column="dept_name" />
  56. <result property="nickName" column="nick_name" />
  57. <result property="sex" column="sex" />
  58. <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
  59. <collection property="posts" javaType="java.util.List" resultMap="PostResult" />
  60. </resultMap>
  61. <resultMap type="tBranchDyVo" id="TBranchDyResult">
  62. <result property="birthday" column="birthday" />
  63. <result property="educationLevel" column="education_level" />
  64. <result property="workJoinTime" column="work_join_time" />
  65. <result property="partyEntryTime" column="party_entry_time" />
  66. <result property="entryTime" column="entry_time" />
  67. <result property="leaveTime" column="leave_time" />
  68. <result property="remarks" column="remarks" />
  69. <result property="createBy" column="create_by" />
  70. <result property="createTime" column="create_time" />
  71. <result property="updateBy" column="update_by" />
  72. <result property="updateTime" column="update_time" />
  73. <result property="deptName" column="dept_name" />
  74. <result property="nickName" column="nick_name" />
  75. <result property="sex" column="sex" />
  76. <result property="phonenumber" column="phonenumber" />
  77. <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
  78. <collection property="posts" javaType="java.util.List" resultMap="PostResult" />
  79. </resultMap>
  80. <resultMap type="tBranchJjfzFzdxVo" id="TBranchJjfzFzdxResult">
  81. <result property="birthday" column="birthday" />
  82. <result property="educationLevel" column="education_level" />
  83. <result property="workJoinTime" column="work_join_time" />
  84. <result property="workEntryTime" column="work_entry_time" />
  85. <result property="isLeague" column="is_league" />
  86. <result property="applyTime" column="apply_time" />
  87. <result property="formCreateTime" column="form_create_time" />
  88. <result property="currentMentor" column="current_mentor" />
  89. <result property="planDevelopDuration" column="plan_develop_duration" />
  90. <result property="isTrained" column="is_trained" />
  91. <result property="remarks" column="remarks" />
  92. <result property="createBy" column="create_by" />
  93. <result property="createTime" column="create_time" />
  94. <result property="updateBy" column="update_by" />
  95. <result property="updateTime" column="update_time" />
  96. <result property="deptName" column="dept_name" />
  97. <result property="nickName" column="nick_name" />
  98. <result property="sex" column="sex" />
  99. <result property="ethnic" column="ethnic" />
  100. <result property="staffId" column="staff_id" />
  101. <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
  102. <collection property="posts" javaType="java.util.List" resultMap="PostResult" />
  103. </resultMap>
  104. <resultMap id="RoleResult" type="SysRole">
  105. <id property="roleId" column="role_id" />
  106. <result property="roleName" column="role_name" />
  107. <result property="roleKey" column="role_key" />
  108. <result property="roleSort" column="role_sort" />
  109. <result property="dataScope" column="data_scope" />
  110. <result property="status" column="role_status" />
  111. </resultMap>
  112. <resultMap id="PostResult" type="SysPost">
  113. <id property="postId" column="post_id" />
  114. <result property="postCode" column="post_code" />
  115. <result property="postName" column="post_name" />
  116. <result property="postSort" column="post_sort" />
  117. <result property="status" column="post_status" />
  118. </resultMap>
  119. <sql id="selectTBranchMemberVo">
  120. select u.member_id, u.new_dept_id, u.old_dept_id, u.ap_no, u.process_id, u.ap_status, u.user_id, u.staff_id, u.ethnic, u.member_type, u.birthday, u.education_level, u.work_join_time, u.work_entry_time, u.party_entry_time, 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,
  121. us.NICK_NAME, us.SEX, us.PHONENUMBER, us.PHOTO,
  122. r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
  123. p.post_id, p.post_code, p.post_name, p.post_sort, p.status as post_status,d.dept_name
  124. from t_branch_member u
  125. left join sys_dept d on u.dept_id = d.dept_id
  126. left join SYS_USER us on us.user_id = u.user_id
  127. left join sys_user_role ur on us.user_id = ur.user_id
  128. left join sys_role r on r.role_id = ur.role_id
  129. left join sys_user_post up on us.user_id = up.user_id
  130. left join sys_post p on p.post_id = up.post_id
  131. </sql>
  132. <select id="selectPoliticalBirthdayList" parameterType="TBranchMember" resultMap="TBranchMemberResult">
  133. <include refid="selectTBranchMemberVo"/>
  134. where u.DEL_FLAG = 0
  135. and extract(month from u.PARTY_ENTRY_TIME) = extract(month from sysdate)
  136. <!-- 数据范围过滤 -->
  137. ${params.dataScope}
  138. </select>
  139. <select id="selectTBranchMemberList" parameterType="TBranchMember" resultMap="TBranchMemberResult">
  140. <include refid="selectTBranchMemberVo"/>
  141. <where>
  142. <if test="memberId != null "> and u.member_id = #{memberId}</if>
  143. <if test="userId != null "> and u.user_id = #{userId}</if>
  144. <if test="memberType != null and memberType != '' and memberType == 1"> and u.member_type = '1' </if>
  145. <if test="memberType != null and memberType != '' and memberType == 2"> and u.member_type in ('2', '3', '5') </if>
  146. <if test="memberType != null and memberType != '' and memberType == 3"> and u.member_type = '3' </if>
  147. <if test="memberType != null and memberType != '' and memberType == 4"> and u.member_type = '4' </if>
  148. <if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
  149. <if test="staffId != null and staffId != ''"> and u.staff_id = #{staffId}</if>
  150. <if test="birthday != null "> and u.birthday = #{birthday}</if>
  151. <if test="educationLevel != null and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
  152. <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
  153. <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
  154. <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
  155. <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
  156. <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
  157. <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
  158. <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
  159. <if test="isLeague != null and isLeague != ''"> and u.is_league = #{isLeague}</if>
  160. <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
  161. <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
  162. <if test="currentMentor != null and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
  163. <if test="planDevelopDuration != null and planDevelopDuration != ''"> and u.plan_develop_duration = #{planDevelopDuration}</if>
  164. <if test="isTrained != null and isTrained != ''"> and u.is_trained = #{isTrained}</if>
  165. <if test="remarks != null and remarks != ''"> and u.remarks like concat(concat('%', #{remarks}), '%')</if>
  166. <if test="deptId != null "> and u.dept_id = #{deptId}</if>
  167. <if test="nickName != null and nickName != ''"> and us.nick_name like concat(concat('%', #{nickName}), '%')</if>
  168. and u.del_flag = 0
  169. </where>
  170. <!-- 数据范围过滤 -->
  171. ${params.dataScope}
  172. </select>
  173. <select id="selectTBranchWyhVoList" parameterType="TBranchMember" resultMap="TBranchWyhResult">
  174. <include refid="selectTBranchMemberVo"/>
  175. <where>
  176. <if test="memberId != null "> and u.member_id = #{memberId}</if>
  177. <if test="userId != null "> and u.user_id = #{userId}</if>
  178. <if test="memberType != null and memberType != '' and memberType == 1"> and u.member_type = '1' </if>
  179. <if test="memberType != null and memberType != '' and memberType == 2"> and u.member_type in ('2', '3') </if>
  180. <if test="memberType != null and memberType != '' and memberType == 3"> and u.member_type = '3' </if>
  181. <if test="memberType != null and memberType != '' and memberType == 4"> and u.member_type = '4' </if>
  182. <if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
  183. <if test="staffId != null and staffId != ''"> and u.staff_id = #{staffId}</if>
  184. <if test="birthday != null "> and u.birthday = #{birthday}</if>
  185. <if test="educationLevel != null and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
  186. <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
  187. <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
  188. <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
  189. <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
  190. <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
  191. <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
  192. <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
  193. <if test="isLeague != null and isLeague != ''"> and u.is_league = #{isLeague}</if>
  194. <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
  195. <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
  196. <if test="currentMentor != null and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
  197. <if test="planDevelopDuration != null and planDevelopDuration != ''"> and u.plan_develop_duration = #{planDevelopDuration}</if>
  198. <if test="isTrained != null and isTrained != ''"> and u.is_trained = #{isTrained}</if>
  199. <if test="remarks != null and remarks != ''"> and u.remarks like concat(concat('%', #{remarks}), '%')</if>
  200. <if test="deptId != null "> and u.dept_id = #{deptId}</if>
  201. <if test="nickName != null and nickName != ''"> and us.nick_name like concat(concat('%', #{nickName}), '%')</if>
  202. and u.del_flag = 0
  203. </where>
  204. <!-- 数据范围过滤 -->
  205. ${params.dataScope}
  206. </select>
  207. <select id="selectTBranchDyVoList" parameterType="TBranchMember" resultMap="TBranchDyResult">
  208. <include refid="selectTBranchMemberVo"/>
  209. <where>
  210. <if test="memberId != null "> and u.member_id = #{memberId}</if>
  211. <if test="userId != null "> and u.user_id = #{userId}</if>
  212. <if test="memberType != null and memberType != '' and memberType == 1"> and u.member_type = '1' </if>
  213. <if test="memberType != null and memberType != '' and memberType == 2"> and u.member_type in ('2', '3') </if>
  214. <if test="memberType != null and memberType != '' and memberType == 3"> and u.member_type = '3' </if>
  215. <if test="memberType != null and memberType != '' and memberType == 4"> and u.member_type = '4' </if>
  216. <if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
  217. <if test="staffId != null and staffId != ''"> and u.staff_id = #{staffId}</if>
  218. <if test="birthday != null "> and u.birthday = #{birthday}</if>
  219. <if test="educationLevel != null and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
  220. <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
  221. <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
  222. <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
  223. <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
  224. <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
  225. <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
  226. <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
  227. <if test="isLeague != null and isLeague != ''"> and u.is_league = #{isLeague}</if>
  228. <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
  229. <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
  230. <if test="currentMentor != null and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
  231. <if test="planDevelopDuration != null and planDevelopDuration != ''"> and u.plan_develop_duration = #{planDevelopDuration}</if>
  232. <if test="isTrained != null and isTrained != ''"> and u.is_trained = #{isTrained}</if>
  233. <if test="remarks != null and remarks != ''"> and u.remarks like concat(concat('%', #{remarks}), '%')</if>
  234. <if test="deptId != null "> and u.dept_id = #{deptId}</if>
  235. <if test="nickName != null and nickName != ''"> and us.nick_name like concat(concat('%', #{nickName}), '%')</if>
  236. and u.del_flag = 0
  237. </where>
  238. <!-- 数据范围过滤 -->
  239. ${params.dataScope}
  240. </select>
  241. <select id="selectTBranchJjfzFzdxVoList" parameterType="TBranchMember" resultMap="TBranchJjfzFzdxResult">
  242. <include refid="selectTBranchMemberVo"/>
  243. <where>
  244. <if test="memberId != null "> and u.member_id = #{memberId}</if>
  245. <if test="userId != null "> and u.user_id = #{userId}</if>
  246. <if test="memberType != null and memberType != '' and memberType == 1"> and u.member_type = '1' </if>
  247. <if test="memberType != null and memberType != '' and memberType == 2"> and u.member_type in ('2', '3') </if>
  248. <if test="memberType != null and memberType != '' and memberType == 3"> and u.member_type = '3' </if>
  249. <if test="memberType != null and memberType != '' and memberType == 4"> and u.member_type = '4' </if>
  250. <if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
  251. <if test="staffId != null and staffId != ''"> and u.staff_id = #{staffId}</if>
  252. <if test="birthday != null "> and u.birthday = #{birthday}</if>
  253. <if test="educationLevel != null and educationLevel != ''"> and u.education_level = #{educationLevel}</if>
  254. <if test="workJoinTime != null "> and u.work_join_time = #{workJoinTime}</if>
  255. <if test="workEntryTime != null "> and u.work_entry_time = #{workEntryTime}</if>
  256. <if test="partyEntryTime != null "> and u.party_entry_time = #{partyEntryTime}</if>
  257. <if test="labourEntryTime != null "> and u.labour_entry_time = #{labourEntryTime}</if>
  258. <if test="labourLeaveTime != null "> and u.labour_leave_time = #{labourLeaveTime}</if>
  259. <if test="entryTime != null "> and u.entry_time = #{entryTime}</if>
  260. <if test="leaveTime != null "> and u.leave_time = #{leaveTime}</if>
  261. <if test="isLeague != null and isLeague != ''"> and u.is_league = #{isLeague}</if>
  262. <if test="applyTime != null "> and u.apply_time = #{applyTime}</if>
  263. <if test="formCreateTime != null "> and u.form_create_time = #{formCreateTime}</if>
  264. <if test="currentMentor != null and currentMentor != ''"> and u.current_mentor = #{currentMentor}</if>
  265. <if test="planDevelopDuration != null and planDevelopDuration != ''"> and u.plan_develop_duration = #{planDevelopDuration}</if>
  266. <if test="isTrained != null and isTrained != ''"> and u.is_trained = #{isTrained}</if>
  267. <if test="remarks != null and remarks != ''"> and u.remarks like concat(concat('%', #{remarks}), '%')</if>
  268. <if test="deptId != null "> and u.dept_id = #{deptId}</if>
  269. <if test="nickName != null and nickName != ''"> and us.nick_name like concat(concat('%', #{nickName}), '%')</if>
  270. and u.del_flag = 0
  271. </where>
  272. <!-- 数据范围过滤 -->
  273. ${params.dataScope}
  274. </select>
  275. <select id="selectTBranchMemberByMemberId" parameterType="Long" resultMap="TBranchMemberResult">
  276. <include refid="selectTBranchMemberVo"/>
  277. where u.member_id = #{memberId}
  278. and u.del_flag = 0
  279. </select>
  280. <insert id="insertTBranchMember" parameterType="TBranchMember">
  281. <selectKey keyProperty="memberId" resultType="long" order="BEFORE">
  282. SELECT seq_t_branch_member.NEXTVAL as memberId FROM DUAL
  283. </selectKey>
  284. insert into t_branch_member
  285. <trim prefix="(" suffix=")" suffixOverrides=",">
  286. <if test="memberId != null">member_id,</if>
  287. <if test="userId != null">user_id,</if>
  288. <if test="memberType != null">member_type,</if>
  289. <if test="ethnic != null">ethnic,</if>
  290. <if test="staffId != null">staff_id,</if>
  291. <if test="birthday != null">birthday,</if>
  292. <if test="educationLevel != null">education_level,</if>
  293. <if test="workJoinTime != null">work_join_time,</if>
  294. <if test="workEntryTime != null">work_entry_time,</if>
  295. <if test="partyEntryTime != null">party_entry_time,</if>
  296. <if test="labourEntryTime != null">labour_entry_time,</if>
  297. <if test="labourLeaveTime != null">labour_leave_time,</if>
  298. <if test="entryTime != null">entry_time,</if>
  299. <if test="leaveTime != null">leave_time,</if>
  300. <if test="isLeague != null">is_league,</if>
  301. <if test="applyTime != null">apply_time,</if>
  302. <if test="formCreateTime != null">form_create_time,</if>
  303. <if test="currentMentor != null">current_mentor,</if>
  304. <if test="planDevelopDuration != null">plan_develop_duration,</if>
  305. <if test="isTrained != null">is_trained,</if>
  306. <if test="remarks != null">remarks,</if>
  307. <if test="delFlag != null">del_flag,</if>
  308. <if test="createBy != null">create_by,</if>
  309. <if test="createTime != null">create_time,</if>
  310. <if test="updateBy != null">update_by,</if>
  311. <if test="updateTime != null">update_time,</if>
  312. <if test="deptId != null">dept_id,</if>
  313. <if test="newDeptId != null">new_dept_id,</if>
  314. <if test="oldDeptId != null">old_dept_id,</if>
  315. <if test="apStatus != null">ap_status,</if>
  316. <if test="apNo != null">ap_no,</if>
  317. <if test="processId != null">process_id,</if>
  318. </trim>
  319. <trim prefix="values (" suffix=")" suffixOverrides=",">
  320. <if test="memberId != null">#{memberId},</if>
  321. <if test="userId != null">#{userId},</if>
  322. <if test="memberType != null">#{memberType},</if>
  323. <if test="ethnic != null">#{ethnic},</if>
  324. <if test="staffId != null">#{staffId},</if>
  325. <if test="birthday != null">#{birthday},</if>
  326. <if test="educationLevel != null">#{educationLevel},</if>
  327. <if test="workJoinTime != null">#{workJoinTime},</if>
  328. <if test="workEntryTime != null">#{workEntryTime},</if>
  329. <if test="partyEntryTime != null">#{partyEntryTime},</if>
  330. <if test="labourEntryTime != null">#{labourEntryTime},</if>
  331. <if test="labourLeaveTime != null">#{labourLeaveTime},</if>
  332. <if test="entryTime != null">#{entryTime},</if>
  333. <if test="leaveTime != null">#{leaveTime},</if>
  334. <if test="isLeague != null">#{isLeague},</if>
  335. <if test="applyTime != null">#{applyTime},</if>
  336. <if test="formCreateTime != null">#{formCreateTime},</if>
  337. <if test="currentMentor != null">#{currentMentor},</if>
  338. <if test="planDevelopDuration != null">#{planDevelopDuration},</if>
  339. <if test="isTrained != null">#{isTrained},</if>
  340. <if test="remarks != null">#{remarks},</if>
  341. <if test="delFlag != null">#{delFlag},</if>
  342. <if test="createBy != null">#{createBy},</if>
  343. <if test="createTime != null">#{createTime},</if>
  344. <if test="updateBy != null">#{updateBy},</if>
  345. <if test="updateTime != null">#{updateTime},</if>
  346. <if test="deptId != null">#{deptId},</if>
  347. <if test="newDeptId != null">#{newDeptId},</if>
  348. <if test="oldDeptId != null">#{oldDeptId},</if>
  349. <if test="apStatus != null">#{apStatus},</if>
  350. <if test="apNo != null">#{apNo},</if>
  351. <if test="processId != null">#{processId},</if>
  352. </trim>
  353. </insert>
  354. <update id="updateTBranchMember" parameterType="TBranchMember">
  355. update t_branch_member
  356. <trim prefix="SET" suffixOverrides=",">
  357. <if test="userId != null">user_id = #{userId},</if>
  358. <if test="memberType != null">member_type = #{memberType},</if>
  359. <if test="ethnic != null">ethnic = #{ethnic},</if>
  360. <if test="staffId != null">staff_id = #{staffId},</if>
  361. <if test="birthday != null">birthday = #{birthday},</if>
  362. <if test="educationLevel != null">education_level = #{educationLevel},</if>
  363. <if test="workJoinTime != null">work_join_time = #{workJoinTime},</if>
  364. <if test="workJoinTime == null">work_join_time = null,</if>
  365. <if test="workEntryTime != null">work_entry_time = #{workEntryTime},</if>
  366. <if test="workEntryTime == null">work_entry_time = null,</if>
  367. <if test="partyEntryTime != null">party_entry_time = #{partyEntryTime},</if>
  368. <if test="partyEntryTime == null">party_entry_time = null,</if>
  369. <if test="labourEntryTime != null">labour_entry_time = #{labourEntryTime},</if>
  370. <if test="labourEntryTime == null">labour_entry_time = null,</if>
  371. <if test="labourLeaveTime != null">labour_leave_time = #{labourLeaveTime},</if>
  372. <if test="labourLeaveTime == null">labour_leave_time = null,</if>
  373. <if test="entryTime != null">entry_time = #{entryTime},</if>
  374. <if test="entryTime == null">entry_time = null,</if>
  375. <if test="leaveTime != null">leave_time = #{leaveTime},</if>
  376. <if test="leaveTime == null">leave_time = null,</if>
  377. <if test="isLeague != null">is_league = #{isLeague},</if>
  378. <if test="applyTime != null">apply_time = #{applyTime},</if>
  379. <if test="applyTime == null">apply_time = null,</if>
  380. <if test="formCreateTime != null">form_create_time = #{formCreateTime},</if>
  381. <if test="formCreateTime == null">form_create_time = null,</if>
  382. <if test="currentMentor != null">current_mentor = #{currentMentor},</if>
  383. <if test="planDevelopDuration != null">plan_develop_duration = #{planDevelopDuration},</if>
  384. <if test="isTrained != null">is_trained = #{isTrained},</if>
  385. <if test="remarks != null">remarks = #{remarks},</if>
  386. <if test="delFlag != null">del_flag = #{delFlag},</if>
  387. <if test="createBy != null">create_by = #{createBy},</if>
  388. <if test="createTime != null">create_time = #{createTime},</if>
  389. <if test="updateBy != null">update_by = #{updateBy},</if>
  390. <if test="updateTime != null">update_time = #{updateTime},</if>
  391. <if test="deptId != null">dept_id = #{deptId},</if>
  392. <if test="apStatus != null">ap_status = #{apStatus},</if>
  393. <if test="newDeptId != null">new_dept_id = #{newDeptId},</if>
  394. <if test="newDeptId == null">new_dept_id = null,</if>
  395. <if test="oldDeptId != null">old_dept_id = #{oldDeptId},</if>
  396. <if test="oldDeptId == null">old_dept_id = null,</if>
  397. <if test="apNo != null">ap_no = #{apNo},</if>
  398. <if test="processId != null">process_id = #{processId},</if>
  399. </trim>
  400. where member_id = #{memberId}
  401. </update>
  402. <update id="deleteTBranchMemberByMemberId" parameterType="Long">
  403. update t_branch_member set del_flag = 2 where member_id = #{memberId}
  404. </update>
  405. <update id="deleteTBranchMemberByMemberIds" parameterType="String">
  406. update t_branch_member set del_flag = 2 where member_id in
  407. <foreach item="memberId" collection="array" open="(" separator="," close=")">
  408. #{memberId}
  409. </foreach>
  410. </update>
  411. </mapper>