Kaynağa Gözat

部门接口

lidongyu 1 yıl önce
ebeveyn
işleme
e83d24664c

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

@@ -203,4 +203,7 @@ public interface RemoteSystemBaseService {
 
     @PostMapping("/user/userFeginlistWithPage")
     List<SysUser> getUserListByPage(@RequestBody SysUser sysUser);
+
+    @GetMapping(value = "/dept/userDeptSelectIncludeChildren/{deptId}")
+    AjaxResult userDeptSelectIncludeChildren(@PathVariable("deptId") String deptId);
 }

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

@@ -166,6 +166,11 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             public List<SysUser> getUserListByPage(@RequestBody SysUser sysUser) {
                 return null;
             }
+
+            @Override
+            public AjaxResult userDeptSelectIncludeChildren(String deptId) {
+                return null;
+            }
         };
     }
 

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

@@ -0,0 +1,28 @@
+package com.sooka.sponest.mobile.system.dept;
+
+import com.ruoyi.common.core.web.domain.AjaxResult;
+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.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * @Author LG
+ * @Date 2023/10/11 - 9:57
+ */
+@RestController
+@RequestMapping("/dept")
+public class DeptController {
+
+    @Resource
+    RemoteSystemBaseService remoteSystemBaseService;
+
+    @GetMapping("/userDeptSelectIncludeChildren")
+    public AjaxResult getUserList(SysDept sysDept) {
+        AjaxResult deptList = remoteSystemBaseService.userDeptSelectIncludeChildren(String.valueOf(sysDept.getDeptId()));
+        return AjaxResult.success(deptList.get("data"));
+    }
+}