t.user_id_ as "userId"
, t.job_nature_ as "jobNature"
, t.is_probation_period_ as "isProbationPeriod"
, t.education_background_ as "educationBackground"
, t.graduate_school_ as "graduateSchool"
, t.technical_titles_ as "technicalTitles"
, t.entry_date_ as "entryDate"
, t.update_time_ as "updateTime"
, t.create_time_ as "createTime"
, t.introduction_ as "introduction"
, t.demission_date_ as "demissionDate"
, t.contact_address_ as "contactAddress"
INSERT INTO sys_user
(is_super_admin_,im_token_,id_,username_,salt_,phone_,avatar_,create_time_,update_time_,wx_openid_,qq_openid_,user_type_,
gender_,nation_,birthdate_,email_,id_card_no_,wechat_id_,real_name_,certificate_type_,password_)
VALUES(#{isSuperAdmin},#{imToken},#{id},#{username},#{salt},#{phone},#{avatar},now(),now(),#{wxOpenid},#{qqOpenid},#{userType},
#{gender},#{nation},#{birthdate},#{email},#{idCardNo},#{wechatId},#{realName},#{certificateType},#{password})
UPDATE sys_user
del_flag_ = #{delFlag},
wx_openid_ = #{wxOpenid},
avatar_ = #{avatar},
email_ = #{email},
gender_ = #{gender},
salt_ = #{salt},
username_ = #{username},
user_type_ = #{userType},
update_time_ = NOW(),
lock_flag_ = #{lockFlag},
birthdate_ = #{birthdate},
phone_ = #{phone},
qq_openid_ = #{qqOpenid},
nation_ = #{nation},
im_token_ = #{imToken},
id_card_no_ = #{idCardNo},
password_ = #{password},
wechat_id_ = #{wechatId},
real_name_ = #{realName},
is_super_admin_ = #{isSuperAdmin},
certificate_type_ = #{certificateType},
WHERE id_ = #{id}
INSERT INTO employee
(user_id_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,
entry_date_,update_time_,create_time_,introduction_,demission_date_,contact_address_)
VALUES(#{userId},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool},
#{technicalTitles},#{entryDate},now(),now(),#{introduction},#{demissionDate},#{contactAddress})
UPDATE employee
job_nature_ = #{jobNature},
is_probation_period_ = #{isProbationPeriod},
education_background_ = #{educationBackground},
graduate_school_ = #{graduateSchool},
technical_titles_ = #{technicalTitles},
entry_date_ = #{entryDate},
update_time_ = NOW(),
introduction_ = #{introduction},
demission_date_ = #{demissionDate},
contact_address_ = #{contactAddress},
WHERE user_id_ = #{userId}
INSERT INTO sys_user_role(user_id_,role_id_) values
(#{userId},#{item})
DELETE FROM sys_user_role WHERE user_id_ = #{userId}
UPDATE employee SET demission_date_ = IF(demission_date_ IS NULL,now(),NULL) WHERE user_id_=#{userID}
INSERT INTO `sys_role` (`role_name_`, `role_code_`, `role_desc_`, `create_time_`,
`update_time_`, `del_flag_`, `organ_id_`, `tenant_id_`)
VALUES (#{roleName}, #{roleCode}, #{roleDesc}, #{createTime},
#{updateTime}, #{delFlag}, #{organId}, #{tenantId});
UPDATE sys_user SET password_ = #{password} WHERE id_ = #{userID}
DELETE FROM employee WHERE user_id_ = #{userId}