Просмотр исходного кода

更改逻辑,只返回已授权的

吴志根 3 лет назад
Родитель
Сommit
8a0f36d9a2

+ 18 - 18
src/dsb/com/cnd3b/restcontroller/customer/wechatapplet/wechatapplet.java

@@ -655,10 +655,10 @@ public class wechatapplet extends Controller {
                 commonPrefixList2.add(obj);
             }
 
-
-            System.err.println(list_Roles.size());
-            System.err.println(list_fauthtype.size());
-            System.err.println(list_tuserid.size());
+//
+//            System.err.println(list_Roles.size());
+//            System.err.println(list_fauthtype.size());
+//            System.err.println(list_tuserid.size());
 
 
         }
@@ -683,15 +683,15 @@ public class wechatapplet extends Controller {
         ArrayList<JSONObject> listFolder = new ArrayList<>();
         for (JSONObject object : listFolderAll) {
             String folderpath = object.getString("folderpath");
-            if (listUserFolders.size() == 0) {
-                listFolder.add(object);
-            } else {
-                for (String str : listUserFolders) {
-                    if (str.equals(folderpath)) {
-                        listFolder.add(object);
-                    }
+//            if (listUserFolders.size() == 0) {
+//                listFolder.add(object);
+//            } else {
+            for (String str : listUserFolders) {
+                if (str.equals(folderpath)) {
+                    listFolder.add(object);
                 }
             }
+//            }
         }
         return listFolder;
     }
@@ -699,14 +699,14 @@ public class wechatapplet extends Controller {
     public ArrayList<JSONObject> getListFolder(ObjectListing listing, ArrayList<String> listUserFolders, ArrayList<String> listRole, ArrayList<String> listfauthtype) {
         ArrayList<JSONObject> listFolderAll = getListFolderAll(listing);
         ArrayList<JSONObject> listFolder = getListFolder(listFolderAll, listUserFolders);
-        if (listFolder.size() == 0) {
-            listFolder = listFolderAll;
-        } else {
-            if (fusertype.equals("¾­ÏúÉÌ")) {
-                //¿ªÆôË«ÏòÑéÖ¤
-                listFolder = check(listFolder, listRole, listfauthtype);
-            }
+//        if (listFolder.size() == 0) {
+//            listFolder = listFolderAll;
+//        } else {
+        if (fusertype.equals("¾­ÏúÉÌ")) {
+            //¿ªÆôË«ÏòÑéÖ¤
+            listFolder = check(listFolder, listRole, listfauthtype);
         }
+//        }
         return listFolder;
     }