随笔分类 - Mybatis
摘要:@Mapper public interface DeptMapper { /** * 分步查询员工 * 及员工所对应的部门 * 分步查询第二步: * 通过部门查询员工所对应的部门 */ Dept getEmpAndDeptByTwo(@Param("did") Integer did); /**
阅读全文
摘要:我这里提供的是mybatis plus 和 xml配置文件结合的方式:直接从service层开始写: service //这是service层,多表分页的简单逻辑处理,重点是IPage 和 Map, // IPage 就是分页,把分页的参数传进来进行使用 // Map 是用来传参数使用的,携带你需要
阅读全文
摘要:Mapper @Mapper public interface EmpMapper { /** * 查询所有的职工信息 */ List<Emp> getAllEmp(); /** * 查询职工及职工所对应的部门信息 */ Emp getEmpAndDept(@Param("eid") Integer
阅读全文
摘要:(一) mybatis-plus自带map下划线转驼峰配置类 我们只需要在yml中配置一下object-wrapper-factory指定MybatisMapWrapperFactory就可以了 mybatis-plus: mapper-locations: classpath:mapper/*Ma
阅读全文