记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
a7bad411
Commit
a7bad411
authored
Apr 14, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收钱吧 支付需要 sku 维度。这里有个待解决问题下单 redis 没降级
parent
b798387d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
GoblinFrontServiceImpl.java
...t/service/goblin/service/impl/GoblinFrontServiceImpl.java
+12
-1
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinFrontServiceImpl.java
View file @
a7bad411
...
...
@@ -1095,7 +1095,6 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
new
LambdaQueryWrapper
<
GoblinSqbPerformanceGoods
>()
.
eq
(
GoblinSqbPerformanceGoods:
:
getPerformancesId
,
performancesId
)
.
eq
(
GoblinSqbPerformanceGoods:
:
getStatus
,
1
)
.
groupBy
(
GoblinSqbPerformanceGoods:
:
getSpuId
)
.
orderByAsc
(
GoblinSqbPerformanceGoods:
:
getSort
,
GoblinSqbPerformanceGoods:
:
getMid
));
if
(
relations
==
null
)
{
...
...
@@ -1109,7 +1108,19 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
// 这样如果商品在 SPU 层面下架,虽然关联关系还在缓存,但这里会动态过滤掉
ArrayList
<
GoblinGoodsInfoVo
>
allGoods
=
ObjectUtil
.
goblinGoodsInfoVoArrayList
();
if
(!
CollectionUtils
.
isEmpty
(
relations
))
{
// 说明:relations 关联的是 SKU(同一 SPU 可能多条),下单侧需要完整 SKU 关系,所以 Redis 缓存必须保留全量。
// 前端“推荐商品列表”展示按 SPU 去重:取排序最靠前的一条关联作为该 SPU 的展示代表。
LinkedHashMap
<
String
,
GoblinSqbPerformanceGoods
>
uniqueSpuRelMap
=
new
LinkedHashMap
<>();
for
(
GoblinSqbPerformanceGoods
rel
:
relations
)
{
if
(
rel
==
null
||
StringUtil
.
isBlank
(
rel
.
getSpuId
()))
{
continue
;
}
if
(!
uniqueSpuRelMap
.
containsKey
(
rel
.
getSpuId
()))
{
uniqueSpuRelMap
.
put
(
rel
.
getSpuId
(),
rel
);
}
}
for
(
GoblinSqbPerformanceGoods
rel
:
uniqueSpuRelMap
.
values
())
{
if
(
rel
==
null
||
StringUtil
.
isBlank
(
rel
.
getSpuId
()))
{
continue
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment