摘要:
题目与文件架构 2023级《JAVA语言程序设计》 上机考试试题 2024.12.27 考试要求 一、本试卷为2023级《JAVA语言程序设计》上机考试试卷; 二. 注意编程规范: (1)程序开头部分注释班级、作者、学号、日期; (2)注意程序代码中必要的空格与缩进; (3)注意类、变量、方法的命名 阅读全文
摘要:
com/Moonbeams/mapper BrandMapper.xml 点击查看代码 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http 阅读全文
摘要:
查询所有品牌:从数据库中获取所有品牌信息并返回。 添加品牌:将新品牌信息插入数据库。 批量删除:根据提供的ID数组批量删除品牌。 分页查询:根据当前页码和每页展示条数进行分页查询。 分页条件查询:根据条件进行分页查询,支持模糊查询和状态过滤。 下面是所有文件内容的汇总 com.Moonbeams.M 阅读全文
摘要:
功能5:分页条件查询 BrandMapper 点击查看代码 /** * 分页条件查询 * @param begin * @param size * @return */ List<Brand> selectByPageAndCondition(@Param("begin") int begin,@P 阅读全文
摘要:
功能4:分页查询 BrandMapper 点击查看代码 /** * 分页查询 * @param begin * @param size * @return */ @Select("select * from tb_brand limit #{begin} , #{size}") @ResultMap 阅读全文
摘要:
功能3:批量删除 BrandMapper 点击查看代码 /** * 批量删除 * @param ids */ void deleteByIds(@Param("ids") int[] ids); <delete id="deleteByIds"> delete from tb_brand where 阅读全文
摘要:
功能2:添加数据 BrandMapper 点击查看代码 /** * 添加数据 * @param brand */ @Insert("insert into tb_brand values(null,#{brandName},#{companyName},#{ordered},#{descriptio 阅读全文
摘要:
功能1:查询所有 ResultMap准备: 点击查看代码 <resultMap id="brandResultMap" type="brand"> <result property="brandName" column="brand_name" /> <result property="compan 阅读全文
摘要:
以下是数据库层面的准备: Sql语句: 点击查看代码 -- 删除tb_brand表 drop table if exists tb_brand; -- 创建tb_brand表 create table tb_brand ( -- id 主键 id int primary key auto_incre 阅读全文
摘要:
以下为基础环境准备: mybatis-config.xml 点击查看代码 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http 阅读全文