5.25总结

发布时间 2023-05-25 21:50:57作者: 封织云
<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>