|
|
|
@@ -38,7 +38,6 @@ import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
import java.io.*; |
|
|
|
import java.time.temporal.TemporalAmount; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.function.Function; |
|
|
|
@@ -1118,10 +1117,14 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
Map<Integer, WxBusiness> bussinessMap = getMap(businessService.getByIds(getIds(customers, InvestCustomerEntity::getBusinessId)), WxBusiness::getId); |
|
|
|
List<InvestCustomerVo> resultList = new ArrayList<>(); |
|
|
|
for (InvestCustomerEntity costomerItem : customers) { |
|
|
|
Optional<InvestDemandEntity> demandItem = Optional.ofNullable(demindsMap.get(costomerItem.getId())); |
|
|
|
WxShop shop = shopsMap.get(demandItem.orElse(null)); |
|
|
|
WxBrand brand = brandMap.get(costomerItem.getBrandId()); |
|
|
|
resultList.add(buildCustomerItem(demandItem.orElse(null), costomerItem, brand, shop, bussinessMap.get(costomerItem.getBusinessId()))); |
|
|
|
InvestDemandEntity demandItem = demindsMap.get(costomerItem.getId()); |
|
|
|
WxShop shop = null; |
|
|
|
WxBrand brand = null ; |
|
|
|
if (Objects.nonNull(demandItem)) { |
|
|
|
shop = shopsMap.get(demandItem.getTargetId()); |
|
|
|
brand = brandMap.get(costomerItem.getBrandId()); |
|
|
|
} |
|
|
|
resultList.add(buildCustomerItem(demandItem, costomerItem, brand, shop, bussinessMap.get(costomerItem.getBusinessId()))); |
|
|
|
} |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
@@ -1140,10 +1143,14 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
|
|
|
|
List<InvestDemandVo> resultList = new ArrayList<>(); |
|
|
|
for (InvestCustomerEntity costomerItem : customers) { |
|
|
|
Optional<InvestDemandEntity> demandItem = Optional.ofNullable(demindsMap.get(costomerItem.getId())); |
|
|
|
WxShop shop = shopsMap.get(demandItem.orElse(null)); |
|
|
|
WxBrand brand = brandMap.get(costomerItem.getBrandId()); |
|
|
|
resultList.add(buildDemindItem(demandItem.orElse(null), costomerItem, brand, shop, usersMap)); |
|
|
|
InvestDemandEntity demandItem = demindsMap.get(costomerItem.getId()); |
|
|
|
WxShop shop = null; |
|
|
|
WxBrand brand = null ; |
|
|
|
if (Objects.nonNull(demandItem)) { |
|
|
|
shop = shopsMap.get(demandItem.getTargetId()); |
|
|
|
brand = brandMap.get(costomerItem.getBrandId()); |
|
|
|
} |
|
|
|
resultList.add(buildDemindItem(demandItem, costomerItem, brand, shop, usersMap)); |
|
|
|
} |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
|