记得上下班打卡 | 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
8b4bc761
Commit
8b4bc761
authored
May 25, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 创建分批购盲盒 和 删除逻辑
parent
a7ed7b2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
7 deletions
+19
-7
GoblinListServiceImpl.java
...ice/goblin/service/impl/manage/GoblinListServiceImpl.java
+19
-7
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinListServiceImpl.java
View file @
8b4bc761
...
@@ -229,7 +229,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -229,7 +229,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
return
ResponseDto
.
failure
(
"库存不足"
);
return
ResponseDto
.
failure
(
"库存不足"
);
}
else
{
}
else
{
redisUtils
.
setSkuStock
(
vo
.
getListId
(),
key
,
stockNum
);
redisUtils
.
setSkuStock
(
vo
.
getListId
(),
key
,
stockNum
);
redisUtils
.
addGoblinListRelationBox
(
vo
.
getListId
(),
itemVo
.
getSku
Id
(),
key
);
redisUtils
.
addGoblinListRelationBox
(
itemVo
.
getSkuId
()
,
vo
.
getList
Id
(),
key
);
}
}
}
}
...
@@ -252,7 +252,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -252,7 +252,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
collectVo
.
setPriceV
(
itemVo
.
getPriceV
());
collectVo
.
setPriceV
(
itemVo
.
getPriceV
());
collectVo
.
setProductId
(
itemVo
.
getProductId
());
collectVo
.
setProductId
(
itemVo
.
getProductId
());
collectVo
.
setWhiteType
(
vo
.
getWhiteType
());
collectVo
.
setWhiteType
(
vo
.
getWhiteType
());
if
(
vo
.
getWhiteType
().
equals
(
1
)
&&
vo
.
getWhiteUrl
().
equals
(
""
))
{
if
(
vo
.
getWhiteType
().
equals
(
1
)
&&
vo
.
getWhiteUrl
().
equals
(
""
))
{
collectVo
.
setWhiteType
(-
1
);
collectVo
.
setWhiteType
(-
1
);
}
}
collectVo
.
setTimeStart
(
st
);
collectVo
.
setTimeStart
(
st
);
...
@@ -314,7 +314,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -314,7 +314,7 @@ public class GoblinListServiceImpl implements IGoblinListService {
for
(
GoblinListCollectVo
itemVo
:
collectVos
)
{
for
(
GoblinListCollectVo
itemVo
:
collectVos
)
{
if
(
itemVo
.
getListId
().
equals
(
param
.
getListId
()))
{
if
(
itemVo
.
getListId
().
equals
(
param
.
getListId
()))
{
itemVo
.
setWhiteType
(
vo
.
getWhiteType
());
itemVo
.
setWhiteType
(
vo
.
getWhiteType
());
if
(
vo
.
getWhiteType
().
equals
(
1
)
&&
vo
.
getWhiteUrl
().
equals
(
""
))
{
if
(
vo
.
getWhiteType
().
equals
(
1
)
&&
vo
.
getWhiteUrl
().
equals
(
""
))
{
itemVo
.
setWhiteType
(-
1
);
itemVo
.
setWhiteType
(-
1
);
}
}
break
;
break
;
...
@@ -343,10 +343,22 @@ public class GoblinListServiceImpl implements IGoblinListService {
...
@@ -343,10 +343,22 @@ public class GoblinListServiceImpl implements IGoblinListService {
queueUtils
.
sendMsgByRedisXls
(
vo
.
getListId
(),
""
,
vo
.
getBlackUrl
(),
"4"
,
item
.
getSkuId
());
queueUtils
.
sendMsgByRedisXls
(
vo
.
getListId
(),
""
,
vo
.
getBlackUrl
(),
"4"
,
item
.
getSkuId
());
}
}
//库存
//获取skuVo
int
restStock
=
redisUtils
.
getSkuStock
(
vo
.
getListId
(),
vo
.
getItemVo
().
get
(
0
).
getSkuId
());
GoblinGoodsSkuInfoVo
skuVo
=
redisUtils
.
getGoodsSkuInfoVo
(
vo
.
getItemVo
().
get
(
0
).
getSkuId
());
if
(
restStock
>
0
)
{
if
(
skuVo
.
getUnbox
().
equals
(
"1"
))
{
redisUtils
.
incrSkuStock
(
null
,
vo
.
getItemVo
().
get
(
0
).
getSkuId
(),
restStock
);
ArrayList
<
String
>
skuIdList
=
redisUtils
.
getGoblinListRelationBox
(
vo
.
getListId
(),
skuVo
.
getSkuId
());
for
(
String
relationSkuId
:
skuIdList
)
{
int
restStock
=
redisUtils
.
getSkuStock
(
vo
.
getListId
(),
relationSkuId
);
if
(
restStock
>
0
)
{
redisUtils
.
incrSkuStock
(
null
,
relationSkuId
,
restStock
);
}
}
}
else
{
//库存
int
restStock
=
redisUtils
.
getSkuStock
(
vo
.
getListId
(),
vo
.
getItemVo
().
get
(
0
).
getSkuId
());
if
(
restStock
>
0
)
{
redisUtils
.
incrSkuStock
(
null
,
vo
.
getItemVo
().
get
(
0
).
getSkuId
(),
restStock
);
}
}
}
redisUtils
.
delGoblinListCollect
(
vo
.
getItemVo
().
get
(
0
).
getSkuId
(),
listId
);
redisUtils
.
delGoblinListCollect
(
vo
.
getItemVo
().
get
(
0
).
getSkuId
(),
listId
);
...
...
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