You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/07/29 01:52:35 UTC

[GitHub] [dolphinscheduler] soreak commented on a change in pull request #5895: [Improvement-5880][api] Optimized data structure of pagination query API results

soreak commented on a change in pull request #5895:
URL: https://github.com/apache/dolphinscheduler/pull/5895#discussion_r678765094



##########
File path: dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/SchedulerServiceImpl.java
##########
@@ -415,15 +416,18 @@
      * @return schedule list page
      */
     @Override
-    public Map<String, Object> querySchedule(User loginUser, String projectName, Integer processDefineId, String searchVal, Integer pageNo, Integer pageSize) {
+    public Result querySchedule(User loginUser, String projectName, Integer processDefineId, String searchVal, Integer pageNo, Integer pageSize) {
 
-        HashMap<String, Object> result = new HashMap<>();
+        Result result = new Result();
 
         Project project = projectMapper.queryByName(projectName);
 
+        Map<String, Object> checkResult = new HashMap<>();
         // check project auth
-        boolean hasProjectAndPerm = projectService.hasProjectAndPerm(loginUser, project, result);
+        boolean hasProjectAndPerm = projectService.hasProjectAndPerm(loginUser, project, checkResult);
         if (!hasProjectAndPerm) {
+            Status status = (Status) checkResult.get(Constants.STATUS);
+            putMsg(result,status);

Review comment:
       ok,i'll fix it 




-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org