Mybatis passes in an object and uses the properties of the object directly

Time:2021-9-14

Name is the attribute of an object

<select id="queryIdByName" resultType="int">
    select id  from role where name = #{name};
</select>