name 为一个对象的属性 <select id="queryIdByName" resultType="int"> select id from role where name = #{name}; </select>