Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-goods-listing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b17ec07d
authored
May 15, 2026
by
周立明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refactor(goods-listing): 去重升级商品id集合
避免重复查询相同的升级商品信息,减少不必要的远程调用开销
1 parent
74b5b3aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
rpc-dj-goods-listing/src/main/java/cn/com/glsx/dj/goods/listing/service/GoodsListingProductBaseService.java
rpc-dj-goods-listing/src/main/java/cn/com/glsx/dj/goods/listing/service/GoodsListingProductBaseService.java
View file @
b17ec07
...
@@ -265,7 +265,7 @@ public class GoodsListingProductBaseService {
...
@@ -265,7 +265,7 @@ public class GoodsListingProductBaseService {
extendedInsuranceTypeIdList
.
addAll
(
equityTypeIdList
);
extendedInsuranceTypeIdList
.
addAll
(
equityTypeIdList
);
List
<
Integer
>
allServiceItemIdList
=
this
.
getAllServiceItemIdList
();
List
<
Integer
>
allServiceItemIdList
=
this
.
getAllServiceItemIdList
();
List
<
Integer
>
upgradeGoodsIds
=
productBaseList
.
stream
().
flatMap
(
o
->
o
.
getDetailList
().
stream
()).
filter
(
o
->
Objects
.
nonNull
(
o
.
getUpgradeGoodsId
()))
List
<
Integer
>
upgradeGoodsIds
=
productBaseList
.
stream
().
flatMap
(
o
->
o
.
getDetailList
().
stream
()).
filter
(
o
->
Objects
.
nonNull
(
o
.
getUpgradeGoodsId
()))
.
map
(
GoodsListingProductDetailDTO:
:
getUpgradeGoodsId
).
collect
(
Collectors
.
toList
());
.
map
(
GoodsListingProductDetailDTO:
:
getUpgradeGoodsId
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Integer
,
UpgradeGoodsDTO
>
upgradeGoodsMap
=
new
HashMap
<>();
Map
<
Integer
,
UpgradeGoodsDTO
>
upgradeGoodsMap
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
upgradeGoodsIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
upgradeGoodsIds
))
{
List
<
UpgradeGoodsDTO
>
upgradeGoodsList
=
goodsListingProductDetailService
.
getUpgradeGoodsByUpgradeGoodsIds
(
upgradeGoodsIds
);
List
<
UpgradeGoodsDTO
>
upgradeGoodsList
=
goodsListingProductDetailService
.
getUpgradeGoodsByUpgradeGoodsIds
(
upgradeGoodsIds
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment