织云等待中...

5.25总结

<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>
posted @ 2023-05-25 21:41  奉禾  阅读(9)  评论(0)    收藏  举报