Browse Source

更新文件 adminManagerAction.java

陈士柏 2 years ago
parent
commit
0272638573
1 changed files with 6 additions and 1 deletions
  1. 6 1
      mhotel/src/com/happy/action/adminManagerAction.java

+ 6 - 1
mhotel/src/com/happy/action/adminManagerAction.java

@@ -219,7 +219,7 @@ public class adminManagerAction extends ActionSupport implements ServletRequestA
                     int lastSlashIndex = file.getUrl().lastIndexOf("/");
                     if(lastSlashIndex >= 0){
                         String result = file.getUrl().substring(lastSlashIndex + 1);
-                        file.setName(result);
+                        file.setName(result+"_营业执照");
                     }
                     fileService.insertFile(file);
                 }
@@ -316,6 +316,11 @@ public class adminManagerAction extends ActionSupport implements ServletRequestA
                 for(FileInfo file : fileInfoList){
                     FileInfo fileInfo = fileService.getById(file.getId());
                     file.setLinkId(String.valueOf(admin.getId()));
+                    int lastSlashIndex = file.getUrl().lastIndexOf("/");
+                    if(lastSlashIndex >= 0){
+                        String result = file.getUrl().substring(lastSlashIndex + 1);
+                        file.setName(result+"_营业执照");
+                    }
                     if(fileInfo==null){
                         fileService.insertFile(file);
                     }else{