摘要:
参数传递 点击查看代码 /* MyBatis 参数封装: * 单个参数: 1. POJO类型:直接使用,属性名 和 参数占位符名称 一致 2. Map集合:直接使用,键名 和 参数占位符名称 一致 3. Collection:封装为Map集合,可以使用@Param注解,替换Map集合中默认的arg键 阅读全文
posted @ 2024-11-02 19:17
QixunQiu
阅读(28)
评论(0)
推荐(0)
摘要:
1.删除一个 点击查看代码 void deleteById(int id); <delete id="deleteById"> delete from tb_brand where id = #{id}; </delete> @Test public void testDeleteById() th 阅读全文
posted @ 2024-11-02 18:58
QixunQiu
阅读(20)
评论(0)
推荐(0)
摘要:
一 添加 点击查看代码 void add(Brand brand); <insert id="add" useGeneratedKeys="true" keyProperty="id"><!--主键返回--> insert into tb_brand (brand_name, company_nam 阅读全文
posted @ 2024-11-02 18:52
QixunQiu
阅读(17)
评论(0)
推荐(0)
浙公网安备 33010602011771号