We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@PostMapping({"/_queryTest"}) @QueryAction @QueryOperation( summary = "使用Post方式分页动态查询" ) public Mono<PagerResult<DeviceInstanceEntity>> queryPagerTest(Mono<QueryParamEntity> query) { String today = LocalDate.now().toString(); return QueryHelper .transformPageResult( //分页查询原始数据 service.queryPager(query), list -> { Mono<List<DeviceInstanceEntity>> collectList = QueryHelper .combineOneToMany( //原始数据转为 ExampleInfo Flux.fromIterable(list).map(e -> e.copyTo(new DeviceInstanceEntity())), //主表数据ID DeviceInstanceEntity::getId, //查询关联表 gkDeviceStateRepository .createQuery() .gt(GkDeviceStateEntity::getStart_time, today + " 00:00:00"), //关联表中的主表ID属性 GkDeviceStateEntity::getDevice_code, //关联数据设置到主表中 GkDeviceStateEntity::setDeviceStateList ) .collectList().flatMap((result)->{ return QueryHelper .combineOneToMany( //原始数据转为 ExampleInfo Flux.fromIterable(result).map(e -> e.copyTo(new DeviceInstanceEntity())), //主表数据ID DeviceInstanceEntity::getId, //查询关联表 gkMesOrderRepository .createQuery(), //关联表中的主表ID属性 GkMesOrderEntity::getDevice_code, //关联数据设置到主表中 GkDeviceStateEntity::setMesOrderList ) .collectList(); }); return collectList; }); }
The text was updated successfully, but these errors were encountered:
用QueryHelper的 原生sql 或者 join 查询试试。
QueryHelper helper;
helper.select
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: