update 优化代码

This commit is contained in:
疯狂的狮子Li
2025-06-27 10:56:09 +08:00
parent af04bc74ed
commit 77dcf4b0d4
6 changed files with 25 additions and 49 deletions

View File

@@ -96,10 +96,8 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService {
LambdaQueryWrapper<FlowDefinition> wrapper = buildQueryWrapper(flowDefinition);
wrapper.in(FlowDefinition::getIsPublish, Arrays.asList(PublishStatus.UNPUBLISHED.getKey(), PublishStatus.EXPIRED.getKey()));
Page<FlowDefinition> page = flowDefinitionMapper.selectPage(pageQuery.build(), wrapper);
TableDataInfo<FlowDefinitionVo> build = TableDataInfo.build();
build.setRows(BeanUtil.copyToList(page.getRecords(), FlowDefinitionVo.class));
build.setTotal(page.getTotal());
return build;
List<FlowDefinitionVo> list = BeanUtil.copyToList(page.getRecords(), FlowDefinitionVo.class);
return new TableDataInfo<>(list, page.getTotal());
}
private LambdaQueryWrapper<FlowDefinition> buildQueryWrapper(FlowDefinition flowDefinition) {