Explorar o código

手机端增加接口根据部门ID和岗位ID查询子节点集合

Wang-Xiao-Ran hai 1 ano
pai
achega
a5a99e13ff

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java

@@ -209,4 +209,7 @@ public interface RemoteSystemBaseService {
 
     @GetMapping("/dept/userDeptSelect")
     AjaxResult getUserDeptSelect();
+
+    @GetMapping("/dept/getChildren/{deptId}/{postId}")
+    AjaxResult getChildren(@PathVariable("deptId") String deptId, @PathVariable("postId") String postId);
 }

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteSystemBaseServiceFallbackFactory.java

@@ -176,6 +176,11 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             public AjaxResult getUserDeptSelect() {
                 return null;
             }
+
+            @Override
+            public AjaxResult getChildren(String deptId, String postId) {
+                return null;
+            }
         };
     }
 

+ 12 - 0
src/main/java/com/sooka/sponest/mobile/system/dept/DeptController.java

@@ -5,6 +5,7 @@ import com.ruoyi.system.api.domain.SysDept;
 import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
@@ -54,4 +55,15 @@ public class DeptController {
 
         }
     }
+
+    /**
+     * 根据部门ID和岗位ID查询子节点集合
+     * @param deptId
+     * @param postId
+     * @return
+     */
+    @GetMapping("/getChildren")
+    public AjaxResult getChildren(@RequestParam("deptId") String deptId, @RequestParam("postId") String postId) {
+        return remoteSystemBaseService.getChildren(deptId, postId);
+    }
 }