@@ -85,20 +85,23 @@ public List<Pan115Attachment> openUFileFiles(String cid, Integer limit, Integer
8585 JsonUtils .json2ObjArr (JsonUtils .obj2Json (data ), new TypeReference <>() {
8686 });
8787 Object pathObj = map .remove ("path" );
88- Pan115Path [] parentPath = JsonUtils .json2ObjArr (JsonUtils .obj2Json (pathObj ), new TypeReference <>() {
89- });
90- for (Pan115Attachment pan115Attachment : pan115Attachments ) {
91- List <Pan115Path > newPaths = new ArrayList <>();
92- Pan115Path lastPath = new Pan115Path ();
93- lastPath .setFile_id (Long .parseLong (pan115Attachment .getFid ()));
94- lastPath .setFile_name (pan115Attachment .getFn ());
95- lastPath .setIss (String .valueOf (pan115Attachment .getIss ()));
96- for (Pan115Path pan115Path : parentPath ) {
97- newPaths .add (pan115Path );
88+ if (pathObj != null ) {
89+ Pan115Path [] parentPath = JsonUtils .json2ObjArr (JsonUtils .obj2Json (pathObj ), new TypeReference <>() {
90+ });
91+ for (Pan115Attachment pan115Attachment : pan115Attachments ) {
92+ List <Pan115Path > newPaths = new ArrayList <>();
93+ Pan115Path lastPath = new Pan115Path ();
94+ lastPath .setFile_id (Long .parseLong (pan115Attachment .getFid ()));
95+ lastPath .setFile_name (pan115Attachment .getFn ());
96+ lastPath .setIss (String .valueOf (pan115Attachment .getIss ()));
97+ for (Pan115Path pan115Path : parentPath ) {
98+ newPaths .add (pan115Path );
99+ }
100+ newPaths .add (lastPath );
101+ pan115Attachment .setPath (newPaths );
98102 }
99- newPaths .add (lastPath );
100- pan115Attachment .setPath (newPaths );
101103 }
104+
102105 if (pan115Attachments == null ) {
103106 return List .of ();
104107 }
0 commit comments