‘linchangsheng’ 6 месяцев назад
Родитель
Сommit
9241572b6b

+ 4 - 3
mall-server-api/src/main/java/com/gree/mall/manager/logic/comlist/ComListAllLogic.java

@@ -335,11 +335,11 @@ public class ComListAllLogic {
         if (CollectionUtils.isEmpty(comDetails)) {
             throw new RemoteServiceException("暂无您可下载的内容");
         }
-        this.download(comDetails, adminUser, response);
+        this.download(comDetails, adminUser, comList,response);
     }
 
 
-    private void download(List<ComDetail> comDetails, AdminUserCom admin, HttpServletResponse response) throws IOException {
+    private void download(List<ComDetail> comDetails, AdminUserCom admin,ComList comList, HttpServletResponse response) throws IOException {
         String title = comDetails.get(0).getTitle();
 
         final List<AdminWebsit> websitList = adminWebsitService.lambdaQuery()
@@ -360,6 +360,7 @@ public class ComListAllLogic {
             comDetailLog.setUserName(admin.getUserName());
             comDetailLog.setWebsitId(comDetail.getWebsitId());
             comDetailLog.setWebsitName(websitMap.get(comDetail.getWebsitId()));
+            comDetailLog.setIsNotice(comList.getIsNotice());
             comDetailLog.insert();
         }
         List<Map<String, Object>> files = new ArrayList<>();
@@ -376,7 +377,7 @@ public class ComListAllLogic {
         if (files.size() > 1) {
             CommonUtils.writeZip(response, files);
         } else {
-            CommonUtils.downloadFile(files.get(0).get("fileUrl").toString(), websitMap.get(admin.getAdminWebsitIds().get(0)) + "-" + title + ".xlsx", response);
+            CommonUtils.downloadFile(files.get(0).get("fileUrl").toString(),files.get(0).get("fileName").toString() , response);
         }
         //CommonUtils.downloadFile(imgFile,admin.getWebsitNumber()+"-"+comDetail.getTitle()+".csv",response);
         //return imgFile;

+ 3 - 2
mall-server-api/src/main/java/com/gree/mall/manager/logic/comlist/ComListLogic.java

@@ -188,10 +188,10 @@ public class ComListLogic {
         if (CollectionUtils.isEmpty(comDetails)) {
             throw new RemoteServiceException("暂无您可下载的内容");
         }
-        this.download(comDetails, adminUser, response);
+        this.download(comDetails, adminUser,comList, response);
     }
 
-    private void download(List<ComDetail> comDetails, AdminUserCom admin, HttpServletResponse response) throws IOException {
+    private void download(List<ComDetail> comDetails, AdminUserCom admin,ComList comList, HttpServletResponse response) throws IOException {
         String title = comDetails.get(0).getTitle();
 
         final List<AdminWebsit> websitList = adminWebsitService.lambdaQuery()
@@ -211,6 +211,7 @@ public class ComListLogic {
             comDetailLog.setTitle(comDetail.getTitle());
             comDetailLog.setUserName(admin.getUserName());
             comDetailLog.setWebsitId(comDetail.getWebsitId());
+            comDetailLog.setIsNotice(comList.getIsNotice());
             comDetailLog.setWebsitName(websitMap.get(comDetail.getWebsitId()));
             comDetailLog.insert();
         }