From cf1b7e6dc5dbd58ee27cf5d42264957eee5abb57 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 19 Oct 2020 10:04:14 +0800 Subject: [PATCH] =?UTF-8?q?cpc=5Fbase=5Fdata=E6=8F=92=E5=85=A5=E5=88=86?= =?UTF-8?q?=E6=89=B9=EF=BC=8C=E5=A4=9A=E4=B8=AApid=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/impl/ShiBeiScreenCollServiceImpl.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java index ef164bfaf8..36e8f87ae7 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java @@ -31,6 +31,7 @@ import com.epmet.dto.screencoll.form.*; import com.epmet.entity.evaluationindex.screen.ScreenEventImgDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenUserJoinEntity; import com.epmet.service.evaluationindex.screen.ShiBeiScreenCollService; +import org.apache.commons.collections4.ListUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -229,7 +230,10 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } while (deleteNum != NumConstant.ZERO); } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { - screenCpcBaseDataDao.batchInsertCpcBaseData(formDTO.getDataList(), customerId); + List> pageByOneHundred = ListUtils.partition(formDTO.getDataList(), NumConstant.ONE_HUNDRED); + pageByOneHundred.forEach(one -> { + screenCpcBaseDataDao.batchInsertCpcBaseData(one, customerId); + }); } } @@ -305,7 +309,7 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { } if (!CollectionUtils.isEmpty(formDTO.getDataList())) { List pidIsZeroList = formDTO.getDataList().stream().filter(d -> d.getPid().equals(NumConstant.ZERO_STR) || "".equals(d.getPid())).collect(Collectors.toList()); - if (pidIsZeroList.size()>=NumConstant.ONE){ + if (pidIsZeroList.size()>NumConstant.ONE){ Object o = JSONObject.toJSON(pidIsZeroList); throw new RenException("多个pid为【0】的数据:"+o.toString()); }