记得上下班打卡 | 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
2319decb
Commit
2319decb
authored
May 25, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/hjc_goblin_list_unbox' into hjc_goblin_list_unbox
parents
12c3dbef
07a16922
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
GoblinOrderUtils.java
...a/com/liquidnet/service/goblin/util/GoblinOrderUtils.java
+3
-2
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+10
-2
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinOrderUtils.java
View file @
2319decb
...
@@ -106,8 +106,9 @@ public class GoblinOrderUtils {
...
@@ -106,8 +106,9 @@ public class GoblinOrderUtils {
}
}
HashMap
<
String
,
Object
>
map
=
redisUtils
.
getGoodsSkuInfoVo
(
LocalDateTime
.
now
(),
skuIdItem
);
HashMap
<
String
,
Object
>
map
=
redisUtils
.
getGoodsSkuInfoVo
(
LocalDateTime
.
now
(),
skuIdItem
);
GoblinGoodsSkuInfoVo
itemVo
=
(
GoblinGoodsSkuInfoVo
)
map
.
get
(
"vo"
);
GoblinGoodsSkuInfoVo
itemVo
=
(
GoblinGoodsSkuInfoVo
)
map
.
get
(
"vo"
);
String
listId2
=
(
String
)
map
.
get
(
"listId"
);
// String listId2 = (String) map.get("listId");
surplusStock
+=
redisUtils
.
getSkuAllStatusStock
(
itemVo
,
listId2
);
// surplusStock += redisUtils.getSkuAllStatusStock(itemVo, listId2);
surplusStock
+=
redisUtils
.
getSkuAllStatusStock
(
itemVo
,
listId
);
totalStock
+=
redisUtils
.
getSkuTotalStock
(
itemVo
);
totalStock
+=
redisUtils
.
getSkuTotalStock
(
itemVo
);
}
}
}
}
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
2319decb
...
@@ -2103,12 +2103,20 @@ public class GoblinRedisUtils {
...
@@ -2103,12 +2103,20 @@ public class GoblinRedisUtils {
public
int
getSkuAllStatusStock
(
GoblinGoodsSkuInfoVo
info
,
String
listId
)
{
public
int
getSkuAllStatusStock
(
GoblinGoodsSkuInfoVo
info
,
String
listId
)
{
if
(
if
(
info
!=
null
info
!=
null
&&
LocalDateTime
.
now
().
isAfter
(
info
.
getSaleStartTime
())
&&
(
null
==
info
.
getSoldoutStatus
()
||
info
.
getSoldoutStatus
().
equals
(
"0"
))
&&
(
null
==
info
.
getSoldoutStatus
()
||
info
.
getSoldoutStatus
().
equals
(
"0"
))
&&
(
null
==
info
.
getHitRatio
()
||
info
.
getHitRatio
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
&&
(
null
==
info
.
getHitRatio
()
||
info
.
getHitRatio
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
&&
(
null
==
info
.
getSkuCanbuy
()
||
info
.
getSkuCanbuy
().
equals
(
"1"
))
&&
(
null
==
info
.
getSkuCanbuy
()
||
info
.
getSkuCanbuy
().
equals
(
"1"
))
)
{
// 可以返回库存
)
{
// 可以返回库存
return
getSkuStock
(
listId
,
info
.
getSkuId
());
// 外面只有盲盒才能请求进来 里面只有不是分批购才判断盲盒里藏品的开售时间
if
(
null
==
listId
)
{
if
(
LocalDateTime
.
now
().
isAfter
(
info
.
getSaleStartTime
()))
{
return
getSkuStock
(
listId
,
info
.
getSkuId
());
}
else
{
return
0
;
}
}
else
{
return
getSkuStock
(
listId
,
info
.
getSkuId
());
}
}
else
{
// 不计入库存
}
else
{
// 不计入库存
return
0
;
return
0
;
}
}
...
...
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