记得上下班打卡 | 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
a9697d03
Commit
a9697d03
authored
May 12, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqb 下架问题
parent
7fb073da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
SqbPerformanceGoodsServiceImpl.java
...i/goblin/service/impl/SqbPerformanceGoodsServiceImpl.java
+7
-5
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/goblin/service/impl/SqbPerformanceGoodsServiceImpl.java
View file @
a9697d03
...
...
@@ -68,9 +68,11 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
}
/**
* Redis 中 SPU、SKU 均有缓存时优先用缓存;否则用 MySQL 行。可售=未删+SPU 展示+非活动独占+SPU/SKU 均为上架(3)。
* 上下架/可售判断:与店铺 {@code POST store/mgt/goods/list} 一致——该列表的 {@code shelvesStatus} 来自 Mongo
* {@link com.liquidnet.service.goblin.dto.vo.GoblinGoodsInfoVo}(见 {@code GoblinMongoUtils#getMgtGoodsInfoVos}),
* 不是读 MySQL;admin 模块无 Mongo 时以 Redis(与 goblin 缓存同源)为准,MySQL 仅兜底。
*/
private
PerfShelfEval
eval
Perf
ShelfState
(
String
skuId
,
String
spuId
,
GoblinGoodsSku
mysqlSku
,
GoblinGoods
mysqlSpu
)
{
private
PerfShelfEval
evalShelfState
(
String
skuId
,
String
spuId
,
GoblinGoodsSku
mysqlSku
,
GoblinGoods
mysqlSpu
)
{
String
sid
=
skuId
==
null
?
""
:
skuId
.
trim
();
String
pid
=
spuId
==
null
?
""
:
spuId
.
trim
();
if
(!
StringUtils
.
hasText
(
sid
)
||
!
StringUtils
.
hasText
(
pid
))
{
...
...
@@ -216,7 +218,7 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
if
(
existing
==
null
)
{
GoblinGoods
spu
=
goblinGoodsMapper
.
selectOne
(
new
LambdaQueryWrapper
<
GoblinGoods
>()
.
eq
(
GoblinGoods:
:
getSpuId
,
sku
.
getSpuId
()).
last
(
"LIMIT 1"
));
if
(!
eval
Perf
ShelfState
(
skuId
,
sku
.
getSpuId
(),
sku
,
spu
).
linkable
)
{
if
(!
evalShelfState
(
skuId
,
sku
.
getSpuId
(),
sku
,
spu
).
linkable
)
{
return
ResponseDto
.
failure
(
"商品未上架或已下架,不可关联。请先让商户上架后再操作。skuId="
+
skuId
);
}
}
...
...
@@ -357,7 +359,7 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
vo
.
setPrice
(
sku
.
getPrice
());
vo
.
setStock
(
sku
.
getSkuStock
());
GoblinGoods
spu
=
spuById
.
get
(
rel
.
getSpuId
());
PerfShelfEval
ev
=
eval
Perf
ShelfState
(
relSkuId
,
rel
.
getSpuId
(),
sku
,
spu
);
PerfShelfEval
ev
=
evalShelfState
(
relSkuId
,
rel
.
getSpuId
(),
sku
,
spu
);
vo
.
setLinkable
(
ev
.
linkable
);
vo
.
setShelfStatusLabel
(
ev
.
statusLabel
);
}
else
{
...
...
@@ -435,7 +437,7 @@ public class SqbPerformanceGoodsServiceImpl implements ISqbPerformanceGoodsServi
vo
.
setSpuTitle
(
spuTitle
);
vo
.
setSkuTitle
(
skuTitle
);
GoblinGoods
spu
=
spuRowById
.
get
(
sku
.
getSpuId
());
PerfShelfEval
ev
=
eval
Perf
ShelfState
(
sku
.
getSkuId
(),
sku
.
getSpuId
(),
sku
,
spu
);
PerfShelfEval
ev
=
evalShelfState
(
sku
.
getSkuId
(),
sku
.
getSpuId
(),
sku
,
spu
);
vo
.
setLinkable
(
ev
.
linkable
);
vo
.
setShelfStatusLabel
(
ev
.
statusLabel
);
vo
.
setTitle
(
sqbSpuSkuDisplay
(
spuTitle
,
skuTitle
)
+
(
ev
.
linkable
?
""
:
"("
+
ev
.
statusLabel
+
")"
));
...
...
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