记得上下班打卡 | 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
74c2d904
Commit
74c2d904
authored
Jun 01, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改生成盲盒库存逻辑
parent
ffbb1ad1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
liquidnet-service-platform-dev.yml
...onfig/liquidnet-config/liquidnet-service-platform-dev.yml
+2
-2
GoblinListServiceImpl.java
...ice/goblin/service/impl/manage/GoblinListServiceImpl.java
+16
-6
No files found.
liquidnet-bus-config/liquidnet-config/liquidnet-service-platform-dev.yml
View file @
74c2d904
...
@@ -14,9 +14,9 @@ liquidnet:
...
@@ -14,9 +14,9 @@ liquidnet:
# rabbitmq:
# rabbitmq:
# connection-timeout: 5000
# connection-timeout: 5000
mysql
:
mysql
:
database-name
:
dev
_ln_scene
database-name
:
test
_ln_scene
mongodb
:
mongodb
:
sslEnabled
:
false
sslEnabled
:
false
database
:
dev
_ln_scene
database
:
test
_ln_scene
#以下为spring各环境个性配置
#以下为spring各环境个性配置
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinListServiceImpl.java
View file @
74c2d904
...
@@ -220,9 +220,19 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -220,9 +220,19 @@ public class GoblinListServiceImpl implements IGoblinListService {
BigDecimal
hitRatioCount
=
new
BigDecimal
(
0
);
BigDecimal
hitRatioCount
=
new
BigDecimal
(
0
);
for
(
String
itemSkuId
:
spuInfoVo
.
getSkuIdList
())
{
for
(
String
itemSkuId
:
spuInfoVo
.
getSkuIdList
())
{
GoblinGoodsSkuInfoVo
skuItemVo
=
redisUtils
.
getGoodsSkuInfoVo
(
itemSkuId
);
GoblinGoodsSkuInfoVo
skuItemVo
=
redisUtils
.
getGoodsSkuInfoVo
(
itemSkuId
);
// if (skuItemVo.getUnbox().equals("0")) {
if
(
skuItemVo
.
getUnbox
().
equals
(
"1"
))
{
// map.put(skuItemVo.getSkuId(), skuItemVo.getHitRatio());
continue
;
// }
}
// 判断开售、停售时间
LocalDateTime
saleStartTime
=
skuItemVo
.
getSaleStartTime
();
LocalDateTime
saleStopTime
=
skuItemVo
.
getSaleStopTime
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
if
(
nowTime
.
isBefore
(
saleStartTime
))
{
continue
;
}
else
if
(
null
!=
saleStopTime
&&
nowTime
.
isAfter
(
saleStopTime
))
{
continue
;
}
//是否购买
//是否购买
if
(!
skuItemVo
.
getSkuCanbuy
().
equals
(
"1"
))
{
if
(!
skuItemVo
.
getSkuCanbuy
().
equals
(
"1"
))
{
...
@@ -239,6 +249,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -239,6 +249,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
map
.
put
(
skuItemVo
.
getSkuId
(),
skuItemVo
.
getHitRatio
());
map
.
put
(
skuItemVo
.
getSkuId
(),
skuItemVo
.
getHitRatio
());
// checkNumberSku++;
// checkNumberSku++;
}
}
}
// if (checkNumberSku <= 0) {
// if (checkNumberSku <= 0) {
// return ResponseDto.failure("盲盒下没有可生成兑换码的sku!");
// return ResponseDto.failure("盲盒下没有可生成兑换码的sku!");
// }
// }
...
@@ -246,9 +257,8 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -246,9 +257,8 @@ public class GoblinListServiceImpl implements IGoblinListService {
// if (countStockNumber < stockNumber) {
// if (countStockNumber < stockNumber) {
// ResponseDto.failure("配置库存大于sku总库存!");
// ResponseDto.failure("配置库存大于sku总库存!");
// }
// }
if
(
isHit
&&
hitRatioCount
.
doubleValue
()
<
100.00
&&
map
.
size
()
>
0
)
{
if
(
isHit
&&
hitRatioCount
.
doubleValue
()
<
100.00
&&
map
.
size
()
>
0
)
{
nftBoxUtils
.
arrangeHitRatioMap
(
map
,
hitRatioCount
);
nftBoxUtils
.
arrangeHitRatioMap
(
map
,
hitRatioCount
);
}
}
}
Map
<
String
,
Integer
>
skuMap
=
nftBoxUtils
.
getSkuHitRatio
(
item
.
getSkuStock
(),
map
);
Map
<
String
,
Integer
>
skuMap
=
nftBoxUtils
.
getSkuHitRatio
(
item
.
getSkuStock
(),
map
);
for
(
String
key
:
skuMap
.
keySet
())
{
for
(
String
key
:
skuMap
.
keySet
())
{
...
...
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