|
|
@ -38,7 +38,13 @@ import org.apache.dolphinscheduler.dao.mapper.UserMapper; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.HashSet; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
|
|
import static org.apache.dolphinscheduler.api.utils.CheckUtils.checkDesc; |
|
|
|
import static org.apache.dolphinscheduler.api.utils.CheckUtils.checkDesc; |
|
|
|
|
|
|
|
|
|
|
@ -500,13 +506,13 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectServic |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* query all project list |
|
|
|
* query all project list |
|
|
|
* |
|
|
|
* @param user |
|
|
|
* @return project list |
|
|
|
* @return project list |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public Map<String, Object> queryAllProjectList() { |
|
|
|
public Map<String, Object> queryAllProjectList(User user) { |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
Map<String, Object> result = new HashMap<>(); |
|
|
|
List<Project> projects = projectMapper.queryAllProject(); |
|
|
|
List<Project> projects = projectMapper.queryAllProject(user.getUserType() == UserType.ADMIN_USER ? 0 : user.getId()); |
|
|
|
|
|
|
|
|
|
|
|
result.put(Constants.DATA_LIST, projects); |
|
|
|
result.put(Constants.DATA_LIST, projects); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|
putMsg(result, Status.SUCCESS); |
|
|
|