haifxu commented on code in PR #8040:
URL: https://github.com/apache/inlong/pull/8040#discussion_r1196298543
##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/transform/StreamTransformServiceImpl.java:
##########
@@ -139,16 +142,35 @@ public Integer save(TransformRequest request, UserInfo
opInfo) {
}
@Override
- public List<TransformResponse> listTransform(String groupId, String
streamId) {
+ public PageResult<TransformResponse> listTransform(TransformPageRequest
request) {
+ String groupId = request.getInlongGroupId();
+ String streamId = request.getInlongStreamId();
LOGGER.debug("begin to fetch transform info by groupId={} and
streamId={} ", groupId, streamId);
- Preconditions.expectNotBlank(groupId, ErrorCodeEnum.GROUP_ID_IS_EMPTY);
- List<StreamTransformEntity> entityList =
transformMapper.selectByRelatedId(groupId, streamId, null);
- if (CollectionUtils.isEmpty(entityList)) {
- return Collections.emptyList();
- }
+ PageHelper.startPage(request.getPageNum(), request.getPageSize());
+ PageResult<TransformResponse> pageResponse = new PageResult<>();
+ pageResponse.setList(getTransform(groupId, streamId));
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]