List<Subject> subList = subjectMapper.selectList(Wrappers.lambdaQuery(Subject.class).in(Subject::getId, subIds)); List<SubjectBo> subjectBoList = EntityUtils.toList(subList, SubjectBo::new); Map<Integer, List<Integer>> map = stuSubRelations.stream().collect(groupingBy(StuSubRelation::getStuId,...
String entityPath = EntityTableCache.getInstance().getCacheData(tableName).toString();//该方法会将大驼峰转为下划线,并完成初始化return!EntityUtils.isHaveAttr(entityPath, COLUMN_TENANTID); } 复制代码 EntityUtils 方法代码如下 (github上的一位小伙子写的,侵权联系我删) /** * 判断实体是否有某个属性 ...
3、普通编码查询数据 publicIPage<DeptVo>selectDeptPage3(){LambdaQueryWrapper<Dept>wrapper=Wrappers.lambdaQuery(Dept.class);Page<Dept>deptPage=this.page(newPage<>(1,3),wrapper);IPage<DeptVo>deptVoPage=EntityUtils.toPage(deptPage,DeptVo::new);// 完成userList字段属性注入Set<Long>deptIds=EntityUt...
publicIPage<DeptVo>selectDeptPage3(){LambdaQueryWrapper<Dept>wrapper=Wrappers.lambdaQuery(Dept.class);Page<Dept>deptPage=this.page(newPage<>(1,3),wrapper);IPage<DeptVo>deptVoPage=EntityUtils.toPage(deptPage,DeptVo::new);// 完成userList字段属性注入Set<Long>deptIds=EntityUtils.toSet(deptVoPage...
(EntityUtils.isHaveAttr(entityPath, TenantGlobalColumnHandler.COLUMN_CREATED_BY_ENTITY)) {11handleColumnsAndExpressions(insert, TenantGlobalColumnHandler.COLUMN_CREATED_BY);12}13//判断实体是否有updateBy属性,追加update_by14if(EntityUtils.isHaveAttr(entityPath,TenantGlobalColumnHandler.COLUMN_UPDATED_BY_...
public IPage<StudentVo> getStudentPage(IPage<Student> page) { // 通过主键查询学生信息 IPage<StudentVo> studentVoPage = EntityUtils.toPage(page(page), StudentVo::new); // 批量查询学生ID Set<Integer> stuIds = studentVoPage.getRecords().stream().map(Student::getId).collect(toSet()); La...
publicList<UserAggrVo>selectList3(){LambdaQueryWrapper<UserAggr>wrapper=Wrappers.lambdaQuery(UserAggr.class).select(UserAggr::getDeptId,UserAggr::getCount).groupBy(UserAggr::getDeptId);List<UserAggr>userAggrList=userAggrMapper.selectList(wrapper);List<UserAggrVo>userAggrVoList=EntityUtils.toList(user...
publicList<UserAggrVo>selectList3(){LambdaQueryWrapper<UserAggr>wrapper=Wrappers.lambdaQuery(UserAggr.class).select(UserAggr::getDeptId,UserAggr::getCount).groupBy(UserAggr::getDeptId);List<UserAggr>userAggrList=userAggrMapper.selectList(wrapper);List<UserAggrVo>userAggrVoList=EntityUtils.toList(user...
EntityUtils强大的数据模型转换工具类 集合转换 代码开源🎉 8216 9 12:44 App SpringBoot MybatisPlus 优雅处理冗余字段 反数据库范式 5417 10 26:57 App ✅MybatisPlus多表连接查询一对一查询列表数据 5874 3 8:24 App SpringBoot Web控制器标准化JSON数据返回值 ResponseEntity AjaxResult 5027 4 11:34...
publicList<UserAggrVo>selectList3(){LambdaQueryWrapper<UserAggr>wrapper=Wrappers.lambdaQuery(UserAggr.class).select(UserAggr::getDeptId,UserAggr::getCount).groupBy(UserAggr::getDeptId);List<UserAggr>userAggrList=userAggrMapper.selectList(wrapper);List<UserAggrVo>userAggrVoList=EntityUtils.toList(user...