From 971c412acdd12cefea1a060eddb3e3021b77ad74 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 14 Feb 2025 10:50:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=94=AE=E5=90=8E=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=A4=84=E7=90=86=E7=BB=93=E6=9E=9C=E6=8F=90=E4=BA=A4=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=90=A5=E4=B8=9A=E9=83=A8=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/AftersalesWorkOrderServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index ccbb0f80f..542b7b6f9 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -2211,8 +2211,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl Date: Fri, 14 Feb 2025 11:16:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=AF=BC=E5=85=A5BUG?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BasicdataBrandCategoryController.java | 4 ++-- .../service/impl/BasicdataTripartiteMallServiceImpl.java | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataBrandCategoryController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataBrandCategoryController.java index f2bf460c7..c3f980b4e 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataBrandCategoryController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataBrandCategoryController.java @@ -74,8 +74,8 @@ public class BasicdataBrandCategoryController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入basicdataBrandCategory") - public R> list(@ApiIgnore @RequestParam Map basicdataBrandCategory, Query query) { - IPage pages = basicdataBrandCategoryService.page(Condition.getPage(query), Condition.getQueryWrapper(basicdataBrandCategory, BasicdataBrandCategoryEntity.class)); + public R> list(@ApiIgnore @RequestParam Map basicdataBrandCategory, Query query) { + List pages = basicdataBrandCategoryService.list(Condition.getPage(query), Condition.getQueryWrapper(basicdataBrandCategory, BasicdataBrandCategoryEntity.class)); return R.data(pages); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java index 30edd9393..f140e1e13 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java @@ -270,13 +270,13 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl Objects.isNull(a.getBrandName())).map(BasicdataTripartiteMallExcel::getTripartiteMall).collect(Collectors.joining(",")); throw new ServiceException(string+"未填写品牌信息"); } - String clientNames = data.stream().map(BasicdataTripartiteMallExcel::getClientName).collect(Collectors.joining(",")); + List clientNames = data.stream().map(BasicdataTripartiteMallExcel::getClientName).distinct().collect(Collectors.toList()); //查询客户信息是否合法 List basicdataClientEntityList = basicdataClientService.list(Wrappers.query().lambda() .in(BasicdataClientEntity::getClientName, clientNames) ); - if (!basicdataClientEntityList.isEmpty()) { + if (basicdataClientEntityList.isEmpty()) { throw new ServiceException(clientNames+"查询客户信息错误"); } Map> listMap = basicdataClientEntityList.stream().collect(Collectors.groupingBy(BasicdataClientEntity::getClientName)); @@ -291,9 +291,12 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl basicdataClientEntities = listMap.get(datum.getClientName()); - if (basicdataClientEntities.size() > 1) { + if (basicdataClientEntities.isEmpty()) { throw new ServiceException(datum.getClientName()+"客户信息错误"); } + if (basicdataClientEntities.size() != 1) { + throw new ServiceException(datum.getClientName()+"客户信息存在多个"); + } BasicdataClientEntity basicdataClientEntity = basicdataClientEntities.get(0); BasicdataTripartiteMallEntity basicdataTripartiteMall = BeanUtil.copyProperties(datum, BasicdataTripartiteMallEntity.class); basicdataTripartiteMall.setClientId(basicdataClientEntity.getId());