Переглянути джерело

修改获取不到空间容量信息的BUG

wukai 2 роки тому
батько
коміт
66364e5b2f

+ 6 - 8
lzga-modules/lzga-doc/src/main/java/com/jjt/doc/controller/DocSpaceController.java

@@ -78,8 +78,7 @@ public class DocSpaceController extends BaseController {
         DocSpace docSpace = new DocSpace();
         docSpace.setOwner(uid);
         docSpace.setSpaceType(DocOfType.PERSONAL.getValue());
-        process(docSpace);
-        return success(docSpace);
+        return success(process(docSpace));
     }
 
     /**
@@ -91,20 +90,18 @@ public class DocSpaceController extends BaseController {
         DocSpace docSpace = new DocSpace();
         docSpace.setOwner(uid);
         docSpace.setSpaceType(DocOfType.DEPT.getValue());
-        process(docSpace);
-        return success(docSpace);
+        return success(process(docSpace));
     }
 
     /**
      * 获取分组存储空间信息
      */
     @GetMapping(value = "/group/{groupId}")
-    public AjaxResult getGroupSpace(Long groupId) {
+    public AjaxResult getGroupSpace(@PathVariable("groupId") Long groupId) {
         DocSpace docSpace = new DocSpace();
         docSpace.setOwner(groupId);
         docSpace.setSpaceType(DocOfType.GROUP.getValue());
-        process(docSpace);
-        return success(docSpace);
+        return success(process(docSpace));
     }
 
     /**
@@ -112,7 +109,7 @@ public class DocSpaceController extends BaseController {
      *
      * @param docSpace
      */
-    private void process(DocSpace docSpace) {
+    private DocSpace process(DocSpace docSpace) {
         List<DocSpace> list = docSpaceService.selectDocSpaceList(docSpace);
         docSpace = list.get(0);
         //查询是否有已申请扩容未审批的记录
@@ -125,6 +122,7 @@ public class DocSpaceController extends BaseController {
         } else {
             docSpace.setIsApply("0");
         }
+        return docSpace;
     }
 
     /**