记得上下班打卡 | 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
89c4fd27
Commit
89c4fd27
authored
Apr 13, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
del:t
parent
0cd7ed14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
83 deletions
+6
-83
GoblinNftGoodsAppController.java
...ervice/goblin/controller/GoblinNftGoodsAppController.java
+1
-1
GoblinNftGoodsAppServiceImpl.java
...ice/goblin/service/impl/GoblinNftGoodsAppServiceImpl.java
+5
-82
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/GoblinNftGoodsAppController.java
View file @
89c4fd27
...
@@ -53,7 +53,7 @@ public class GoblinNftGoodsAppController {
...
@@ -53,7 +53,7 @@ public class GoblinNftGoodsAppController {
}
}
@PostMapping
(
"exchange"
)
@PostMapping
(
"exchange"
)
@ApiOperation
(
"redisData
"
)
// @ApiOperation("兑换
")
@ApiImplicitParams
({
@ApiImplicitParams
({
@ApiImplicitParam
(
type
=
"from"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
"兑换码"
,
example
=
"1"
),
@ApiImplicitParam
(
type
=
"from"
,
required
=
true
,
dataType
=
"String"
,
name
=
"code"
,
value
=
"兑换码"
,
example
=
"1"
),
})
})
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinNftGoodsAppServiceImpl.java
View file @
89c4fd27
...
@@ -73,7 +73,7 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -73,7 +73,7 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
List
<
GoblinGoodsSkuInfoVo
>
skuInfoVos
=
mongoTemplate
.
find
(
query
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
List
<
GoblinGoodsSkuInfoVo
>
skuInfoVos
=
mongoTemplate
.
find
(
query
,
GoblinGoodsSkuInfoVo
.
class
,
GoblinGoodsSkuInfoVo
.
class
.
getSimpleName
());
for
(
GoblinGoodsSkuInfoVo
info
:
skuInfoVos
)
{
for
(
GoblinGoodsSkuInfoVo
info
:
skuInfoVos
)
{
//获取预约相关
//获取预约相关
AnticipateValueVo
anticipateValueVo
=
goblinGoodsAnticipateService
.
getAnticipateValueBySkuId
(
info
.
getSkuId
(),
0
);
AnticipateValueVo
anticipateValueVo
=
goblinGoodsAnticipateService
.
getAnticipateValueBySkuId
(
info
.
getSkuId
(),
0
);
// sku信息
// sku信息
GoblinNftGoodsSkuListVo
nftGoodsSkuInfoVo
=
GoblinNftGoodsSkuListVo
.
getNew
().
copy
(
info
,
anticipateValueVo
);
GoblinNftGoodsSkuListVo
nftGoodsSkuInfoVo
=
GoblinNftGoodsSkuListVo
.
getNew
().
copy
(
info
,
anticipateValueVo
);
// spu信息
// spu信息
...
@@ -119,7 +119,7 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -119,7 +119,7 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
GoblinGoodsSkuInfoVo
goodsSkuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
skuId
);
GoblinGoodsSkuInfoVo
goodsSkuInfoVo
=
goblinRedisUtils
.
getGoodsSkuInfoVo
(
skuId
);
if
(
goblinRedisUtils
.
getSkuAllStatusShow
(
goodsSkuInfoVo
))
{
if
(
goblinRedisUtils
.
getSkuAllStatusShow
(
goodsSkuInfoVo
))
{
//获取预约相关
//获取预约相关
AnticipateValueVo
anticipateValueVo
=
goblinGoodsAnticipateService
.
getAnticipateValueBySkuId
(
skuId
,
1
);
AnticipateValueVo
anticipateValueVo
=
goblinGoodsAnticipateService
.
getAnticipateValueBySkuId
(
skuId
,
1
);
GoblinNftGoodsSkuInfoVo
nftGoodsSkuInfoVo
=
GoblinNftGoodsSkuInfoVo
.
getNew
().
copy
(
goodsSkuInfoVo
,
anticipateValueVo
);
GoblinNftGoodsSkuInfoVo
nftGoodsSkuInfoVo
=
GoblinNftGoodsSkuInfoVo
.
getNew
().
copy
(
goodsSkuInfoVo
,
anticipateValueVo
);
// 限购数量
// 限购数量
...
@@ -164,87 +164,10 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
...
@@ -164,87 +164,10 @@ public class GoblinNftGoodsAppServiceImpl implements IGoblinNftGoodsAppService {
@Override
@Override
public
Boolean
exchange
(
String
code
)
{
public
Boolean
exchange
(
String
code
)
{
/*// 验证
// 使用
// 下单
return true;*/
try
{
try
{
// int dbs = 255;
// 验证
int
dbs
=
15
;
// 使用
String
redisKey2
=
"goblin:nftOrder:orderCode*"
;
// 下单
String
redisKey3
=
"goblin:nftOrder:idList:user*"
;
String
redisKey4
=
"goblin:nftOrder:refund*"
;
String
redisKey5
=
"goblin:nftOrder:lock:userId*"
;
String
redisKey6
=
"goblin:nftGoodsList*"
;
String
redisKey7
=
"goblin:nftNumAccount*"
;
String
redisKey1
=
"goblin:nftOrder*"
;
String
redisKey11
=
"goblin:nft:order:id:"
;
String
redisKey22
=
"goblin:nft:order:code:"
;
String
redisKey33
=
"goblin:nft:order:idList:"
;
String
redisKey44
=
"goblin:nft:order:refund:"
;
String
redisKey55
=
"goblin:nft:order:lock:"
;
String
redisKey66
=
"goblin:nft:goodsList"
;
String
redisKey77
=
"goblin:nft:account:"
;
for
(
int
i
=
0
;
i
<
dbs
;
i
++)
{
Set
<
String
>
keys2
=
redisUtil
.
getRedisTemplateByDb
(
i
).
keys
(
redisKey2
);
for
(
String
key
:
keys2
)
{
String
[]
split
=
key
.
split
(
":"
);
String
keyId
=
split
[
split
.
length
-
1
];
String
value
=
(
String
)
redisUtil
.
get
(
key
);
redisUtil
.
set
(
redisKey22
.
concat
(
keyId
),
value
);
redisUtil
.
del
(
key
);
}
Set
<
String
>
keys3
=
redisUtil
.
getRedisTemplateByDb
(
i
).
keys
(
redisKey3
);
for
(
String
key
:
keys3
)
{
String
[]
split
=
key
.
split
(
":"
);
String
keyId
=
split
[
split
.
length
-
1
];
List
<
String
>
value
=
(
List
<
String
>)
redisUtil
.
get
(
key
);
redisUtil
.
set
(
redisKey33
.
concat
(
keyId
),
value
);
redisUtil
.
del
(
key
);
}
Set
<
String
>
keys4
=
redisUtil
.
getRedisTemplateByDb
(
i
).
keys
(
redisKey4
);
for
(
String
key
:
keys4
)
{
String
[]
split
=
key
.
split
(
":"
);
String
keyId
=
split
[
split
.
length
-
1
];
GoblinNftOrderRefundVo
value
=
(
GoblinNftOrderRefundVo
)
redisUtil
.
get
(
key
);
redisUtil
.
set
(
redisKey44
.
concat
(
keyId
),
value
);
redisUtil
.
del
(
key
);
}
Set
<
String
>
keys6
=
redisUtil
.
getRedisTemplateByDb
(
i
).
keys
(
redisKey6
);
for
(
String
key
:
keys6
)
{
String
[]
split
=
key
.
split
(
":"
);
String
keyId
=
split
[
split
.
length
-
1
];
List
<
GoblinNftGoodsSkuListVo
>
value
=
(
List
<
GoblinNftGoodsSkuListVo
>)
redisUtil
.
get
(
key
);
redisUtil
.
set
(
redisKey66
.
concat
(
keyId
),
value
);
redisUtil
.
del
(
key
);
}
Set
<
String
>
keys7
=
redisUtil
.
getRedisTemplateByDb
(
i
).
keys
(
redisKey7
);
for
(
String
key
:
keys7
)
{
String
[]
split
=
key
.
split
(
":"
);
String
keyId
=
split
[
split
.
length
-
1
];
Integer
value
=
(
Integer
)
redisUtil
.
get
(
key
);
redisUtil
.
set
(
redisKey77
.
concat
(
keyId
),
value
);
redisUtil
.
del
(
key
);
}
Set
<
String
>
keys1
=
redisUtil
.
getRedisTemplateByDb
(
i
).
keys
(
redisKey1
);
for
(
String
key
:
keys1
)
{
String
[]
split
=
key
.
split
(
":"
);
String
keyId
=
split
[
split
.
length
-
1
];
GoblinNftOrderVo
value
=
(
GoblinNftOrderVo
)
redisUtil
.
get
(
key
);
redisUtil
.
set
(
redisKey11
.
concat
(
keyId
),
value
);
redisUtil
.
del
(
key
);
}
}
return
true
;
return
true
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"cityVote5Error"
,
e
);
log
.
error
(
"cityVote5Error"
,
e
);
...
...
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