记得上下班打卡 | 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
7e9644eb
Commit
7e9644eb
authored
Aug 26, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加 字段 routeType
parent
0f02fdbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
GoblinGagoController.java
.../web/controller/zhengzai/goblin/GoblinGagoController.java
+6
-4
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-web/src/main/java/com/liquidnet/client/admin/web/controller/zhengzai/goblin/GoblinGagoController.java
View file @
7e9644eb
...
...
@@ -36,7 +36,7 @@ public class GoblinGagoController extends BaseController {
RedisDataSourceUtil
redisDataSourceUtil
;
@Autowired
GoblinRedisUtils
goblinRedisUtils
;
@Value
(
"${liquidnet.service.order.url}"
)
@Value
(
"${liquidnet.service.order.url}"
)
private
String
orderUrl
;
// private String orderUrl = "http://127.0.0.1:9004/order";
...
...
@@ -75,6 +75,7 @@ public class GoblinGagoController extends BaseController {
public
AjaxResult
listByStatus
(
@RequestParam
(
value
=
"skuId"
)
String
skuId
,
@RequestParam
(
value
=
"nftNum"
)
int
nftNum
,
@RequestParam
(
value
=
"uid"
)
String
uid
)
{
//当前 nft序号
GoblinGoodsSkuInfoVo
skuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
skuId
);
String
routeType
=
skuInfoVo
.
getRouteType
();
int
cNufCount
=
goblinRedisUtils
.
getNftCountBySku
(
skuInfoVo
.
getRouteType
(),
skuId
);
if
(
cNufCount
>=
nftNum
)
{
return
AjaxResult
.
error
(
"该序号已售卖"
);
...
...
@@ -90,9 +91,9 @@ public class GoblinGagoController extends BaseController {
return
AjaxResult
.
error
(
"该序号已被占用"
);
}
//
int
count
=
goblinRedisUtils
.
decrSkuStock
(
null
,
skuId
,
1
);
if
(
count
<
0
)
{
goblinRedisUtils
.
incrSkuStock
(
null
,
skuId
,
1
);
int
count
=
goblinRedisUtils
.
decrSkuStock
(
null
,
skuId
,
1
);
if
(
count
<
0
)
{
goblinRedisUtils
.
incrSkuStock
(
null
,
skuId
,
1
);
goblinRedisUtils
.
removeNftList
(
skuId
,
nftNum
+
""
);
return
AjaxResult
.
error
(
"已售罄"
);
}
...
...
@@ -113,6 +114,7 @@ public class GoblinGagoController extends BaseController {
dto
.
setNftOrderPayId
(
innerReturnVo
.
getData
());
dto
.
setSkuId
(
skuId
);
dto
.
setUserId
(
uid
);
dto
.
setRouterType
(
routeType
);
goblinRedisUtils
.
setNftNumDetails
(
nftNum
+
""
,
skuId
,
dto
);
return
AjaxResult
.
success
();
}
else
{
...
...
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