diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DqExecuteResultServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DqExecuteResultServiceImpl.java index ae14e9e4af..5b82239295 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DqExecuteResultServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DqExecuteResultServiceImpl.java @@ -87,7 +87,7 @@ public class DqExecuteResultServiceImpl extends BaseServiceImpl implements DqExe dqExecuteResultMapper.queryResultListPaging( page, searchVal, - loginUser.getId(), + loginUser, statusArray, ruleType, start, diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DqExecuteResultServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DqExecuteResultServiceTest.java index cf380a33bd..fb8b596913 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DqExecuteResultServiceTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DqExecuteResultServiceTest.java @@ -85,7 +85,7 @@ public class DqExecuteResultServiceTest { page.setTotal(1); page.setRecords(getExecuteResultList()); when(dqExecuteResultMapper.queryResultListPaging( - any(IPage.class), eq(""), eq(loginUser.getId()), any(),eq(ruleType), eq(start), eq(end))).thenReturn(page); + any(IPage.class), eq(""), eq(loginUser), any(),eq(ruleType), eq(start), eq(end))).thenReturn(page); Result result = dqExecuteResultService.queryResultListPaging( loginUser,searchVal,1,0,"2020-01-01 00:00:00","2020-01-02 00:00:00",1,10); diff --git a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.java b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.java index 39fc26e57a..c522019edf 100644 --- a/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.java +++ b/dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.java @@ -18,6 +18,7 @@ package org.apache.dolphinscheduler.dao.mapper; import org.apache.dolphinscheduler.dao.entity.DqExecuteResult; +import org.apache.dolphinscheduler.dao.entity.User; import org.apache.ibatis.annotations.Param; @@ -36,7 +37,7 @@ public interface DqExecuteResultMapper extends BaseMapper { * * @param page page * @param searchVal searchVal - * @param userId userId + * @param user user * @param statusArray states * @param ruleType ruleType * @param startTime startTime @@ -44,7 +45,7 @@ public interface DqExecuteResultMapper extends BaseMapper { */ IPage queryResultListPaging(IPage page, @Param("searchVal") String searchVal, - @Param("userId") int userId, + @Param("user") User user, @Param("states") int[] statusArray, @Param("ruleType") int ruleType, @Param("startTime") Date startTime, diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.xml index 4fa09a3c4f..5ca517e616 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.xml @@ -62,8 +62,8 @@ #{i} - - and a.user_id = #{userId} + + and a.user_id = #{user.id} and a.rule_type = #{ruleType}