From 37e3716f6a72861ce554f0c3614e62e06c5fec42 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 11 Jun 2024 10:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bweb/controller/HighGasController.java | 2 +- .../service/impl/HighMerchantStoreServiceImpl.java | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java index dc4e0c4f..4b1a8a72 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java @@ -447,7 +447,7 @@ public class HighGasController { Map param = new HashMap<>(); param.put("type", 1); - param.put("sourceType", 1); + param.put("sourceType", "1,3"); param.put("status", 1); if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java index f359ca40..c85269dc 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java @@ -26,11 +26,9 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; -import java.util.Comparator; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; +import java.util.stream.IntStream; @Service("highMerchantStoreService") @@ -207,8 +205,11 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService { criteria.andTypeEqualTo(MapUtils.getInteger(map, "type")); } - if (MapUtils.getInteger(map, "sourceType") != null) { - criteria.andSourceTypeEqualTo(MapUtils.getInteger(map, "sourceType")); + if (StringUtils.isNotBlank(MapUtils.getString(map, "sourceType"))) { + List sourceType = Arrays.stream(MapUtils.getString(map, "sourceType").split(",")) + .flatMapToInt(num -> IntStream.of(Integer.parseInt(num))).boxed() + .collect(Collectors.toList()); + criteria.andSourceTypeIn(sourceType); } if (MapUtils.getLong(map, "companyId") != null) {