UPDATE users SET followup = #{followup}, followup_at = NOW(), type = #{type}, level = #{level}, detailedaddress = #{detailedaddress}, company = #{company}, demand = #{demand}, region = #{region} WHERE userId = #{userId} INSERT INTO usermanagements (userId, userName, managercompany, managerdepartment, organization, role, managerId) VALUES (#{userId}, #{userName}, #{managercompany}, #{managerdepartment}, #{organization}, #{role}, #{userId}) ON DUPLICATE KEY UPDATE userName = #{userName}, managercompany = #{managercompany}, managerdepartment = #{managerdepartment}, organization = #{organization}, role = #{role}, managerId = #{userId} UPDATE users SET sync_statuss = NULL WHERE userId = #{userId} UPDATE users SET sync_statuss = 0 WHERE userId = #{userId} UPDATE users SET type = #{type}, sync_statuss = NULL WHERE userId = #{userId} UPDATE usermanagements SET managercompany = '', managerdepartment = '', organization = '', role = '', userName = '' WHERE userId = #{userId}