From 52b18c84159bcebde8f6a4c332be784f7ceb4d72 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 27 Aug 2021 13:46:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BE=85=E5=A4=84=E7=90=86=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6sql=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/ResiEventDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml index 5883c4ccec..3284be99e6 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml @@ -47,9 +47,9 @@ )t LEFT JOIN resi_event_attachment rea - ON (rea.RESI_EVENT_ID = t.eventId) - where rea.DEL_FLAG = '0' - AND rea.ATTACHMENT_TYPE = 'image' + ON (rea.RESI_EVENT_ID = t.eventId + and rea.DEL_FLAG = '0' + AND rea.ATTACHMENT_TYPE = 'image') ORDER BY t.eventTime,rea.sort asc From 0e408f78c21a29b8c6240c65110d6b93409654fd Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 27 Aug 2021 14:41:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=92=E5=85=A5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=A4=AA=E5=A4=9A=E5=86=85=E5=AD=98=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../extract/todata/impl/ProjectExtractServiceImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index f05f6e5f70..f4f616a722 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -35,6 +35,7 @@ import com.epmet.service.project.ProjectService; import com.epmet.service.stats.DimCustomerService; import com.epmet.service.topic.TopicService; import com.epmet.util.DimIdGenerator; +import com.google.common.collect.Lists; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -478,9 +479,11 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { formattingData.add(dest); }); - if(!CollectionUtils.isEmpty(formattingData)) { - factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(null,param.getCustomerId()); - factOriginProjectOrgPeriodDailyDao.insertBatch(formattingData); + if (!CollectionUtils.isEmpty(formattingData)) { + factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(null, param.getCustomerId()); + Lists.partition(formattingData, NumConstant.ONE_HUNDRED) + .forEach(part -> factOriginProjectOrgPeriodDailyDao.insertBatch(part)); + } }