diff --git a/.gitignore b/.gitignore index 5c8565db..924580e2 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,7 @@ build/ /cash-service/account-service/src/main/resources/rebel.xml /cash-api/account-server/src/main/resources/rebel.xml /logs/ +/cash-api/account-server/src/main/resources/application-zs.yml +/cash-api/order-server/src/main/resources/application-zs.yml +/cash-api/product-server/src/main/resources/application-zs.yml +/cash-api/system-server/src/main/resources/application-zs.yml diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/UProductServiceImpl.java b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/UProductServiceImpl.java index 6e747347..74e29b6e 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/UProductServiceImpl.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/UProductServiceImpl.java @@ -81,7 +81,7 @@ public class UProductServiceImpl extends ServiceImpl imp }); Map productKv = productAllList.stream().collect(Collectors.toMap(ShopProductVo::getId, shopProductVo -> shopProductVo)); List prodGroupIdList = groupList.stream().map(ShopGroupProductVo::getId).distinct().toList(); - List relationList = prodGroupRelationMapper.selectListByQueryAs(query().select(ProdGroupRelation::getProdGroupId, ProdGroupRelation::getProductId).in(ProdGroupRelation::getProdGroupId, prodGroupIdList), ProdGroupRelationDTO.class); + List relationList = prodGroupIdList.isEmpty() ? new ArrayList<>() : prodGroupRelationMapper.selectListByQueryAs(query().select(ProdGroupRelation::getProdGroupId, ProdGroupRelation::getProductId).in(ProdGroupRelation::getProdGroupId, prodGroupIdList), ProdGroupRelationDTO.class); Map> relationKv = relationList.stream().collect(Collectors.groupingBy(ProdGroupRelationDTO::getProdGroupId, Collectors.mapping(ProdGroupRelationDTO::getProductId, Collectors.toList()))); for (ShopGroupProductVo group : groupList) { List productIdList = relationKv.get(group.getId()); @@ -167,4 +167,4 @@ public class UProductServiceImpl extends ServiceImpl imp return dayOfWeek.getDisplayName(TextStyle.FULL, Locale.ENGLISH); } -} \ No newline at end of file +}