浏览代码

首页支部原地宣传bugfix

wangggziwen 9 月之前
父节点
当前提交
dc457db2f9

+ 5 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/branch/TBranchPublicizeController.java

@@ -64,13 +64,15 @@ public class TBranchPublicizeController extends BaseController
             tFile2.setTableId(branchPublicize.getPublicizeId());
             List<TFile> tFiles2 = fileService.selectTFileList(tFile2);
 
-            if (tFiles != null) {
+            if (tFiles.size() != 0) {
                 TFile file = tFiles.get(0);
-                TFile file2 = tFiles2.get(0);
                 ProfilesVO vo = new ProfilesVO();
                 vo.setUrl(file.getUrl());
-                vo.setUrl2(file2.getUrl());
                 vo.setTitle(branchPublicize.getPublicizeTitle());
+                if (tFiles2.size() != 0) {
+                    TFile file2 = tFiles2.get(0);
+                    vo.setUrl2(file2.getUrl());
+                }
                 profileVOs.add(vo);
             }
         }