@Insert("insert into user(userName,age) values(#{user.userName}, #{user.age})") void saveImport(@Param("user") User userLists);
<insert id="insertPlatForm" parameterType="Api"> insert into b_platform_register( <if test="appId != null and appId != ''">f_appid,</if> <if test="appName != null and appName != ''">f_app_name,</if> <if test="appSecret != null and appSecret != ''">f_app_secret,</if> <if test="grantType != null and grantType != ''">f_grant_type,</if> <if test="accessToken != null and accessToken != ''">f_access_token,</if> <if test="platformIp != null and platformIp != ''">platform_ip,</if> <if test="platformPort != null and platformPort != ''">platform_port,</if> create_time )values( <if test="appId != null and appId != ''">#{appId},</if> <if test="appName != null and appName != ''">#{appName},</if> <if test="appSecret != null and appSecret != ''">#{appSecret},</if> <if test="grantType != null and grantType != ''">#{grantType},</if> <if test="accessToken != null and accessToken != ''">#{accessToken},</if> <if test="platformIp != null and platformIp != ''">#{platformIp},</if> <if test="platformPort != null and platformPort != ''">#{platformPort},</if> sysdate() ) </insert>