5.25总结

FZhiYun'Blogs / 2023-05-26 / 原文

<resultMap id="brandResultMap" type="com.itheima.pojo.Brand">
    <result column="brand_name" property="brandName"/>
    <result column="brand_name" property="companyName"/>
</resultMap>

<select id="selectAll" resultType="com.itheima.pojo.Brand">
    select * from tb_brand;

</select>


<!--
    * 参数占位符:
        1:#{} :
        2. ${} :

-->


<select id="selectById" resultMap="brandResultMap">
    select * from tb_brand where id = #{id};
</select>