select employee_id, dept_id, employee_name, employee_no, contact_phone_cipher, contact_phone_hash, position, card_no, face_image, enabled, del_flag, create_by, create_time, update_by, update_time from t_employee select e.employee_id, e.dept_id, d.dept_name, e.employee_name, e.employee_no, e.contact_phone_cipher, e.position, e.card_no, e.face_image, e.enabled, e.create_time from t_employee e left join sys_dept d on d.dept_id = e.dept_id and d.del_flag = '0' insert into t_employee ( dept_id, employee_name, employee_no, contact_phone_cipher, contact_phone_hash, position, card_no, face_image, enabled, create_by, create_time ) values ( #{deptId}, #{employeeName}, #{employeeNo}, #{contactPhoneCipher}, #{contactPhoneHash}, #{position}, #{cardNo}, #{faceImage}, #{enabled}, #{createBy}, sysdate() ) update t_employee set dept_id = #{deptId}, employee_name = #{employeeName}, employee_no = #{employeeNo}, contact_phone_cipher = #{contactPhoneCipher}, contact_phone_hash = #{contactPhoneHash}, position = #{position}, card_no = #{cardNo}, face_image = #{faceImage}, enabled = #{enabled}, update_by = #{updateBy}, update_time = sysdate() where employee_id = #{employeeId} and del_flag = '0' update t_employee set enabled = #{enabled}, update_by = #{updateBy}, update_time = sysdate() where del_flag = '0' and employee_id in #{employeeId} update t_employee set card_no = null, update_by = #{updateBy}, update_time = sysdate() where del_flag = '0' and employee_id in #{employeeId} update t_employee set card_no = #{cardNo}, update_by = #{updateBy}, update_time = sysdate() where employee_id = #{employeeId} and del_flag = '0' update t_employee set face_image = null, update_by = #{updateBy}, update_time = sysdate() where del_flag = '0' and employee_id in #{employeeId} update t_employee set enabled = 0, card_no = null, face_image = null, del_flag = '1', update_by = #{updateBy}, update_time = sysdate() where del_flag = '0' and employee_id in #{employeeId}