Browse Source

修改数据质量查询的权限判断 (#10977)

Co-authored-by: fanwanlong <fanwanlong@kezaihui.com>
3.1.0-release
jackfanwan 2 years ago committed by GitHub
parent
commit
ccb7641468
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/DqExecuteResultServiceImpl.java
  2. 2
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/DqExecuteResultServiceTest.java
  3. 5
      dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.java
  4. 4
      dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.xml

2
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,

2
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);

5
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<DqExecuteResult> {
*
* @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<DqExecuteResult> {
*/
IPage<DqExecuteResult> queryResultListPaging(IPage<DqExecuteResult> 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,

4
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/DqExecuteResultMapper.xml

@ -62,8 +62,8 @@
#{i}
</foreach>
</if>
<if test=" userId != 1">
and a.user_id = #{userId}
<if test=" user.userType.code != 0">
and a.user_id = #{user.id}
</if>
<if test=" ruleType != -1">
and a.rule_type = #{ruleType}

Loading…
Cancel
Save