From 5e1a53e2b2d3e530da9b79bcc69ec53ae60781e1 Mon Sep 17 00:00:00 2001
From: DESKTOP-71BH0QO\L、ming <172680469@qq.com>
Date: 星期三, 21 四月 2021 21:16:04 +0800
Subject: [PATCH] no

---
 springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java |   30 ++++--------------------------
 1 files changed, 4 insertions(+), 26 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java
index 3307c47..1cac4a7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/ShopApi.java
@@ -222,19 +222,8 @@
     public R export(@RequestBody ComShopOrderExportDTO comShopOrderExportDTO) {
         ClazzUtils.setIfStringIsEmpty(comShopOrderExportDTO);
         String url = excelUrl;
-        String uuid = UUID.randomUUID().toString().replace("-", "");
         //String name=uuid+".xlsx";
         String ftpUrl = "/mnt/data/web/excel/";
-
-        R<ShopStoreVO> storeR = communityService.getUserStoreInfo(getUserId());
-
-        if (!R.isOk(storeR)) {
-            return R.fail("用户不是商家");
-        }
-
-        ShopStoreVO shopStoreVO = JSONObject.parseObject(JSONObject.toJSONString(storeR.getData()), ShopStoreVO.class);
-        Long userId = this.getUserId();
-        comShopOrderExportDTO.setUserId(userId);
         R r = communityService.shopOrderExportData(comShopOrderExportDTO);
         if (R.isOk(r)) {
             List<ExcelShopOrderDTO> excelShopOrderDTO = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopOrderDTO.class);
@@ -244,7 +233,7 @@
             try {
                 SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
                 sftp.login();
-                String name = shopStoreVO.getName() + "商城订单-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx";
+                String name =  "商城订单-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx";
                 boolean existDir = sftp.isExistDir(ftpUrl + name);
                 if (!existDir) {
                     String property = System.getProperty("user.dir");
@@ -254,7 +243,7 @@
                     InputStream inputStream = null;
                     try {
                         excelWriter = EasyExcel.write(fileName, ExcelShopOrderDTO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build();
-                        WriteSheet writeSheet = EasyExcel.writerSheet(shopStoreVO.getName() + "订单").build();
+                        WriteSheet writeSheet = EasyExcel.writerSheet( "商家订单").build();
                         excelWriter.write(excelShopOrderDTO, writeSheet);
                         excelWriter.finish();
                         File file = new File(fileName);
@@ -314,19 +303,8 @@
     public R export(@RequestBody ComShopFundsExportDTO comShopFundsExportDTO) {
         ClazzUtils.setIfStringIsEmpty(comShopFundsExportDTO);
         String url = excelUrl;
-        String uuid = UUID.randomUUID().toString().replace("-", "");
         //String name=uuid+".xlsx";
         String ftpUrl = "/mnt/data/web/excel/";
-
-        R<ShopStoreVO> storeR = communityService.getUserStoreInfo(getUserId());
-
-        if (!R.isOk(storeR)) {
-            return R.fail("用户不是商家");
-        }
-
-        ShopStoreVO shopStoreVO = JSONObject.parseObject(JSONObject.toJSONString(storeR.getData()), ShopStoreVO.class);
-        Long userId = this.getUserId();
-        comShopFundsExportDTO.setUserId(userId);
         R r = communityService.shopOrderFundsExportData(comShopFundsExportDTO);
         if (R.isOk(r)) {
             List<ExcelShopFundsDTO> excelShopFundsDTO = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ExcelShopFundsDTO.class);
@@ -336,7 +314,7 @@
             try {
                 SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
                 sftp.login();
-                String name = shopStoreVO.getName() + "-商家资金流水-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx";
+                String name = "商家资金流水-" + new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()) + ".xlsx";
                 boolean existDir = sftp.isExistDir(ftpUrl + name);
                 if (!existDir) {
                     String property = System.getProperty("user.dir");
@@ -346,7 +324,7 @@
                     InputStream inputStream = null;
                     try {
                         excelWriter = EasyExcel.write(fileName, ExcelShopFundsDTO.class).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).registerWriteHandler(new CustomSheetWriteHandler()).build();
-                        WriteSheet writeSheet = EasyExcel.writerSheet(shopStoreVO.getName() + "订单").build();
+                        WriteSheet writeSheet = EasyExcel.writerSheet("订单").build();
                         excelWriter.write(excelShopFundsDTO, writeSheet);
                         excelWriter.finish();
                         File file = new File(fileName);

--
Gitblit v1.7.1