From 537c0dfeab9b6c65e4d121aa556612b2f53b282b Mon Sep 17 00:00:00 2001 From: Burce Date: Thu, 24 Oct 2019 15:22:08 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=8B=9B=E5=95=86]adjust?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/invest/impl/InvestBizServiceImpl.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java index 370ec72eb..ea84f9429 100644 --- a/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java @@ -92,6 +92,8 @@ public class InvestBizServiceImpl implements InvestBizService { } List demandList = demandService.list(new LambdaQueryWrapper<>(demandParams)); LambdaQueryWrapper queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams); + queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo()); + if (Objects.isNull(InvestUserContext.getDataUser())) { if (CollectionUtils.isEmpty(demandList) && Objects.nonNull(params.getDemandOwner())) { return investPage; @@ -105,7 +107,7 @@ public class InvestBizServiceImpl implements InvestBizService { queryWrapperCustomer.in(CollectionUtils.isNotEmpty(demandList),InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId)); } } - queryWrapperCustomer.like(StringUtils.isNotBlank(params.getCustomerNo()), InvestCustomerEntity::getCustomerNo, params.getCustomerNo()); + queryWrapperCustomer.orderByDesc(InvestCustomerEntity::getCreateDate); InvestPageResult customers = customerService.queryPage(buildPageQuery(params, null), queryWrapperCustomer); List resultList = getTargeInfoList(demandList, customers.getRecords()); @@ -325,7 +327,7 @@ public class InvestBizServiceImpl implements InvestBizService { InvestDemandDto customerBase = convetCustomer(customer, brandMap, businesseMap, shopMap, customerMap); if (customerBase == null) { stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); - log.error("userBasenull"); + log.error("customerBase null"); } saveCustomerAndDemand(customerBase) ; }); @@ -421,9 +423,8 @@ public class InvestBizServiceImpl implements InvestBizService { private InvestDemandDto doConvertDemand(InvestDemandQuery params) { InvestCustomerEntity customerEntity = null; - if (ObjectUtils.anyNotNull(params.getCustomerNo(), params.getCustomerType(), params.getBusinessId())) { + if (ObjectUtils.anyNotNull(params.getCustomerType(), params.getBusinessId())) { customerEntity = new InvestCustomerEntity(); - customerEntity.setCustomerNo(params.getCustomerNo()); customerEntity.setType(params.getCustomerType()); customerEntity.setBusinessId(params.getBusinessId()); }