From ed7ec8ac1048aecb12c5e59ba0ceeefef2c57c34 Mon Sep 17 00:00:00 2001 From: "Mr.An" <42627702+SnowMoon-Dev@users.noreply.github.com> Date: Thu, 14 Jul 2022 11:16:28 +0800 Subject: [PATCH] [fix-10954]Querying the task group list returns empty data (#10955) * fix task group query page retrun is null --- .../service/impl/TaskGroupServiceImpl.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java index 048e641a81..4b567670e2 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/TaskGroupServiceImpl.java @@ -17,9 +17,6 @@ package org.apache.dolphinscheduler.api.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.dolphinscheduler.api.constants.ApiFuncIdentificationConstant; import org.apache.dolphinscheduler.api.enums.Status; import org.apache.dolphinscheduler.api.service.ExecutorService; @@ -35,11 +32,6 @@ import org.apache.dolphinscheduler.dao.entity.User; import org.apache.dolphinscheduler.dao.mapper.TaskGroupMapper; import org.apache.dolphinscheduler.service.process.ProcessService; import org.apache.dolphinscheduler.spi.utils.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.Collections; @@ -49,6 +41,16 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + /** * task Group Service */ @@ -189,7 +191,7 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe */ @Override public Map queryAllTaskGroup(User loginUser, String name, Integer status, int pageNo, int pageSize) { - return this.doQuery(loginUser, pageNo, pageSize, loginUser.getUserType().equals(UserType.ADMIN_USER) ? 0 : loginUser.getId(), name, status); + return this.doQuery(loginUser, pageNo, pageSize, loginUser.getId(), name, status); } /**