From cd825c50723133880bf3852ad3e383e9eb01f30e Mon Sep 17 00:00:00 2001
From: Null <281575458@qq.com>
Date: 星期一, 15 三月 2021 09:19:56 +0800
Subject: [PATCH] 模板导入便民服务

---
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComCvtServeExcelListen.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComCvtServeExcelListen.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComCvtServeExcelListen.java
index 23b205d..37fadc6 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComCvtServeExcelListen.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComCvtServeExcelListen.java
@@ -22,9 +22,11 @@
 
     private CommunityService communityService;
 
+    private Long communityId;
 
-    public ComCvtServeExcelListen(CommunityService communityService){
+    public ComCvtServeExcelListen(CommunityService communityService,Long communityId){
         this.communityService = communityService;
+        this.communityId = communityId;
     }
 
 
@@ -36,7 +38,7 @@
         // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
         if(list.size() >= BATCH_COUNT){
             log.info("excel导入数据【{}】", JSONObject.toJSONString(list));
-            R r = this.communityService.listSaveConvenientServeExcelVO(list);
+            R r = this.communityService.listSaveConvenientServeExcelVO(list,this.communityId);
             if (!R.isOk(r)) {
                 throw new ServiceException(r.getMsg());
             }
@@ -48,7 +50,7 @@
     @Override
     public void doAfterAllAnalysed(AnalysisContext analysisContext) {
         log.info("excel导入数据【{}】", JSONObject.toJSONString(list));
-        R r = this.communityService.listSaveConvenientServeExcelVO(list);//确保最后遗留的数据保存在数据库中
+        R r = this.communityService.listSaveConvenientServeExcelVO(list,this.communityId);//确保最后遗留的数据保存在数据库中
         if (!R.isOk(r)) {
             throw new ServiceException(r.getMsg());
         }

--
Gitblit v1.7.1