记得上下班打卡 | 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
494ecf43
Commit
494ecf43
authored
May 09, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 搜索接口
parent
df88a73d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
GoblinMongoUtils.java
...a/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
+5
-1
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+15
-0
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinMongoUtils.java
View file @
494ecf43
...
@@ -1583,7 +1583,11 @@ public class GoblinMongoUtils {
...
@@ -1583,7 +1583,11 @@ public class GoblinMongoUtils {
continue
;
continue
;
}
}
GoblinGoodsSkuInfoVo
itemVo
=
redisUtils
.
getGoodsSkuInfoVo
(
skuIdItem
);
GoblinGoodsSkuInfoVo
itemVo
=
redisUtils
.
getGoodsSkuInfoVo
(
skuIdItem
);
stock
+=
redisUtils
.
getSkuAllStatusStock
(
itemVo
);
if
(
"4"
.
equals
(
filterParam
.
getShelvesStatus
()))
{
stock
+=
redisUtils
.
getSkuAllStatusStockStatus4
(
itemVo
);
}
else
{
stock
+=
redisUtils
.
getSkuAllStatusStock
(
itemVo
);
}
}
}
mgtGoodsSkuListVo
.
setSurplusStock
(
stock
);
mgtGoodsSkuListVo
.
setSurplusStock
(
stock
);
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
494ecf43
...
@@ -1803,6 +1803,21 @@ public class GoblinRedisUtils {
...
@@ -1803,6 +1803,21 @@ public class GoblinRedisUtils {
}
}
}
}
// 获取盲盒下藏品的库存 各种状态下不能算库存的排除掉
public
int
getSkuAllStatusStockStatus4
(
GoblinGoodsSkuInfoVo
info
)
{
if
(
info
!=
null
&&
LocalDateTime
.
now
().
isBefore
(
info
.
getSaleStartTime
())
&&
(
null
==
info
.
getSoldoutStatus
()
||
info
.
getSoldoutStatus
().
equals
(
"0"
))
&&
(
null
==
info
.
getHitRatio
()
||
info
.
getHitRatio
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
&&
(
null
==
info
.
getSkuCanbuy
()
||
info
.
getSkuCanbuy
().
equals
(
"1"
))
)
{
// 可以返回库存
return
getSkuStock
(
null
,
info
.
getSkuId
());
}
else
{
// 不计入库存
return
0
;
}
}
// 各种状态下判断藏品是否可以展示
// 各种状态下判断藏品是否可以展示
public
boolean
getSkuAllStatusShow
(
GoblinGoodsSkuInfoVo
info
)
{
public
boolean
getSkuAllStatusShow
(
GoblinGoodsSkuInfoVo
info
)
{
if
(
if
(
...
...
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