<update id="update" parameterType="map" > update user <set> <if test="user.name!=null">name=#{user.name},</if> <if test="user.age!=null">age=#{user.age},</if> <if test="user.gender!=null">gender=#{user.gender},</if> <if test="user.phone!=null">phone=#{user.phone},</if> <if test="user.username!=null">username=#{user.username},</if> <if test="user.password!=null">password=#{user.password},</if> </set> where id=#{id} </update> 多个参数用map update没有返回结果不能设置resultType