update g_user set name = #{name} , department = #{department} , title = #{title} , email = #{email} , mobile = #{mobile} , updated_date = datetime('now') , updated_id = #{updated_id} where userid = #{userid} delete from g_user where userid = #{userid} insert into g_user ( userid , passwd , name , department , title , level_code , email , mobile , created_date , created_id , deleted_ind ) values ( #{userid} , #{passwd} , #{name} , #{department} , #{title} , #{level_code} , #{email} , #{mobile} , datetime('now') , #{created_id} , 'N' )