记得上下班打卡 | 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
562be6d4
Commit
562be6d4
authored
Apr 15, 2022
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis删除过期时间
parent
9ccacef6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
AbstractDataUtils.java
...com/liquidnet/service/galaxy/utils/AbstractDataUtils.java
+14
-14
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-common/src/main/java/com/liquidnet/service/galaxy/utils/AbstractDataUtils.java
View file @
562be6d4
...
@@ -31,11 +31,11 @@ public abstract class AbstractDataUtils {
...
@@ -31,11 +31,11 @@ public abstract class AbstractDataUtils {
public
abstract
QueueUtil
getQueueUtil
();
public
abstract
QueueUtil
getQueueUtil
();
private
long
keyExpireTime
=
3600
*
24
*
30
;
//
private long keyExpireTime = 3600*24*30;
public
void
setGalaxyUserInfo
(
String
routerType
,
String
userId
,
GalaxyUserInfoBo
userInfoBo
)
{
public
void
setGalaxyUserInfo
(
String
routerType
,
String
userId
,
GalaxyUserInfoBo
userInfoBo
)
{
String
userType
=
GalaxyEnum
.
RegisterTypeEnum
.
PERSON
.
getCode
();
String
userType
=
GalaxyEnum
.
RegisterTypeEnum
.
PERSON
.
getCode
();
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_USER
.
concat
(
routerType
).
concat
(
":"
)
+
userId
,
userInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_USER
.
concat
(
routerType
).
concat
(
":"
)
+
userId
,
userInfoBo
);
//入库mongo
//入库mongo
GalaxyUserInfoVo
userInfoVo
=
GalaxyUserInfoVo
.
getNew
();
GalaxyUserInfoVo
userInfoVo
=
GalaxyUserInfoVo
.
getNew
();
BeanUtil
.
copy
(
userInfoBo
,
userInfoVo
);
BeanUtil
.
copy
(
userInfoBo
,
userInfoVo
);
...
@@ -78,7 +78,7 @@ public abstract class AbstractDataUtils {
...
@@ -78,7 +78,7 @@ public abstract class AbstractDataUtils {
}
}
public
void
setSeriesNftUploadBo
(
String
routerType
,
String
skuId
,
GalaxySeriesNftUploadBo
seriesNftUploadBo
)
{
public
void
setSeriesNftUploadBo
(
String
routerType
,
String
skuId
,
GalaxySeriesNftUploadBo
seriesNftUploadBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT_UPLOAD
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftUploadBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT_UPLOAD
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftUploadBo
);
//mongo入库
//mongo入库
GalaxySeriesNftUploadVo
seriesNftUploadVo
=
GalaxySeriesNftUploadVo
.
getNew
();
GalaxySeriesNftUploadVo
seriesNftUploadVo
=
GalaxySeriesNftUploadVo
.
getNew
();
...
@@ -112,7 +112,7 @@ public abstract class AbstractDataUtils {
...
@@ -112,7 +112,7 @@ public abstract class AbstractDataUtils {
}
}
public
void
setSeriesInfoBo
(
String
routerType
,
String
seriesCode
,
GalaxySeriesInfoBo
seriesInfoBo
)
{
public
void
setSeriesInfoBo
(
String
routerType
,
String
seriesCode
,
GalaxySeriesInfoBo
seriesInfoBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES
.
concat
(
routerType
).
concat
(
":"
)
+
seriesCode
,
seriesInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES
.
concat
(
routerType
).
concat
(
":"
)
+
seriesCode
,
seriesInfoBo
);
// insert into galaxy_series_info (mid, series_info_id, series_name, series_code, series_id, total_count
// insert into galaxy_series_info (mid, series_info_id, series_name, series_code, series_id, total_count
// , crt_count,series_claim_task_id, series_claim_status, cover_url, series_desc
// , crt_count,series_claim_task_id, series_claim_status, cover_url, series_desc
...
@@ -157,7 +157,7 @@ public abstract class AbstractDataUtils {
...
@@ -157,7 +157,7 @@ public abstract class AbstractDataUtils {
}
}
public
void
setSeriesNftInfoBo
(
String
routerType
,
String
skuId
,
GalaxySeriesInfoBo
seriesInfoBo
,
GalaxySeriesNftInfoBo
seriesNftInfoBo
)
{
public
void
setSeriesNftInfoBo
(
String
routerType
,
String
skuId
,
GalaxySeriesInfoBo
seriesInfoBo
,
GalaxySeriesNftInfoBo
seriesNftInfoBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftInfoBo
);
//初始化nft发行绑定索引,未发行则初始化为0,
//初始化nft发行绑定索引,未发行则初始化为0,
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_PUBLISH_NFT
.
concat
(
routerType
).
concat
(
":"
).
concat
(
skuId
),
seriesNftInfoBo
.
getNftIdBeginIndex
()-
1
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_PUBLISH_NFT
.
concat
(
routerType
).
concat
(
":"
).
concat
(
skuId
),
seriesNftInfoBo
.
getNftIdBeginIndex
()-
1
);
...
@@ -207,7 +207,7 @@ public abstract class AbstractDataUtils {
...
@@ -207,7 +207,7 @@ public abstract class AbstractDataUtils {
}
}
public
void
updateSeriesClaimStatus
(
String
routerType
,
String
seriesCode
,
GalaxySeriesInfoBo
seriesInfoBo
)
{
public
void
updateSeriesClaimStatus
(
String
routerType
,
String
seriesCode
,
GalaxySeriesInfoBo
seriesInfoBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES
.
concat
(
routerType
).
concat
(
":"
)
+
seriesCode
,
seriesInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES
.
concat
(
routerType
).
concat
(
":"
)
+
seriesCode
,
seriesInfoBo
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"seriesCode"
).
is
(
seriesInfoBo
.
getSeriesCode
()));
Query
query
=
Query
.
query
(
Criteria
.
where
(
"seriesCode"
).
is
(
seriesInfoBo
.
getSeriesCode
()));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesInfoBo
)));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesInfoBo
)));
...
@@ -238,7 +238,7 @@ public abstract class AbstractDataUtils {
...
@@ -238,7 +238,7 @@ public abstract class AbstractDataUtils {
public
void
updateSeriesNftStatus
(
String
routerType
,
String
skuId
,
GalaxySeriesNftInfoBo
seriesNftInfoBo
)
{
public
void
updateSeriesNftStatus
(
String
routerType
,
String
skuId
,
GalaxySeriesNftInfoBo
seriesNftInfoBo
)
{
//更新系列nft状态
//更新系列nft状态
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftInfoBo
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
skuId
));
Query
query
=
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
skuId
));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesNftInfoBo
)));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesNftInfoBo
)));
...
@@ -283,7 +283,7 @@ public abstract class AbstractDataUtils {
...
@@ -283,7 +283,7 @@ public abstract class AbstractDataUtils {
public
void
setNftOrderBo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBo
nftOrderBo
)
{
public
void
setNftOrderBo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBo
nftOrderBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_TRADE_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_TRADE_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBo
);
/**
/**
* 入库mongo
* 入库mongo
*/
*/
...
@@ -350,7 +350,7 @@ public abstract class AbstractDataUtils {
...
@@ -350,7 +350,7 @@ public abstract class AbstractDataUtils {
* @param nftOrderBo
* @param nftOrderBo
*/
*/
public
void
updateNftOrderPublishInfo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBo
nftOrderBo
)
{
public
void
updateNftOrderPublishInfo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBo
nftOrderBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_TRADE_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_TRADE_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBo
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"nftOrderPayId"
).
is
(
nftOrderBo
.
getNftOrderPayId
()));
Query
query
=
Query
.
query
(
Criteria
.
where
(
"nftOrderPayId"
).
is
(
nftOrderBo
.
getNftOrderPayId
()));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
nftOrderBo
)));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
nftOrderBo
)));
...
@@ -385,7 +385,7 @@ public abstract class AbstractDataUtils {
...
@@ -385,7 +385,7 @@ public abstract class AbstractDataUtils {
* @param nftOrderBo
* @param nftOrderBo
*/
*/
public
void
updateNftOrderBuyInfo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBo
nftOrderBo
)
{
public
void
updateNftOrderBuyInfo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBo
nftOrderBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_TRADE_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_TRADE_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBo
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"nftOrderPayId"
).
is
(
nftOrderPayId
));
Query
query
=
Query
.
query
(
Criteria
.
where
(
"nftOrderPayId"
).
is
(
nftOrderPayId
));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
nftOrderBo
)));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
nftOrderBo
)));
...
@@ -414,7 +414,7 @@ public abstract class AbstractDataUtils {
...
@@ -414,7 +414,7 @@ public abstract class AbstractDataUtils {
}
}
public
void
setGalaxyNftOrderBindBo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBindBo
nftOrderBindBo
)
{
public
void
setGalaxyNftOrderBindBo
(
String
routerType
,
String
nftOrderPayId
,
GalaxyNftOrderBindBo
nftOrderBindBo
)
{
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_PUBLISH_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBindBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_PUBLISH_ORDER
.
concat
(
routerType
).
concat
(
":"
)
+
nftOrderPayId
,
nftOrderBindBo
);
//入库mongo
//入库mongo
GalaxyNftOrderBindVo
nftOrderBindVo
=
GalaxyNftOrderBindVo
.
getNew
();
GalaxyNftOrderBindVo
nftOrderBindVo
=
GalaxyNftOrderBindVo
.
getNew
();
BeanUtil
.
copy
(
nftOrderBindBo
,
nftOrderBindVo
);
BeanUtil
.
copy
(
nftOrderBindBo
,
nftOrderBindVo
);
...
@@ -434,7 +434,7 @@ public abstract class AbstractDataUtils {
...
@@ -434,7 +434,7 @@ public abstract class AbstractDataUtils {
GalaxyNftOrderBindBo
nftOrderBindBo
=
GalaxyNftOrderBindBo
.
getNew
();
GalaxyNftOrderBindBo
nftOrderBindBo
=
GalaxyNftOrderBindBo
.
getNew
();
BeanUtil
.
copy
(
nftOrderBindVo
,
nftOrderBindBo
);
BeanUtil
.
copy
(
nftOrderBindVo
,
nftOrderBindBo
);
this
.
getRedisUtil
().
set
(
redisKey
,
nftOrderBindBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
redisKey
,
nftOrderBindBo
);
return
nftOrderBindBo
;
return
nftOrderBindBo
;
}
}
}
}
...
@@ -507,7 +507,7 @@ public abstract class AbstractDataUtils {
...
@@ -507,7 +507,7 @@ public abstract class AbstractDataUtils {
public
void
updateSeriesCrtCount
(
String
routerType
,
String
seriesCode
)
{
public
void
updateSeriesCrtCount
(
String
routerType
,
String
seriesCode
)
{
GalaxySeriesInfoBo
seriesInfoBo
=
this
.
getSeriesInfoBo
(
routerType
,
seriesCode
);
GalaxySeriesInfoBo
seriesInfoBo
=
this
.
getSeriesInfoBo
(
routerType
,
seriesCode
);
seriesInfoBo
.
setCrtCount
(
seriesInfoBo
.
getCrtCount
()+
1
);
seriesInfoBo
.
setCrtCount
(
seriesInfoBo
.
getCrtCount
()+
1
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES
.
concat
(
routerType
).
concat
(
":"
)
+
seriesCode
,
seriesInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES
.
concat
(
routerType
).
concat
(
":"
)
+
seriesCode
,
seriesInfoBo
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"seriesCode"
).
is
(
seriesInfoBo
.
getSeriesCode
()));
Query
query
=
Query
.
query
(
Criteria
.
where
(
"seriesCode"
).
is
(
seriesInfoBo
.
getSeriesCode
()));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesInfoBo
)));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesInfoBo
)));
...
@@ -536,7 +536,7 @@ public abstract class AbstractDataUtils {
...
@@ -536,7 +536,7 @@ public abstract class AbstractDataUtils {
public
void
updateSeriesNftCrtCount
(
String
routerType
,
String
skuId
)
{
public
void
updateSeriesNftCrtCount
(
String
routerType
,
String
skuId
)
{
GalaxySeriesNftInfoBo
seriesNftInfoBo
=
this
.
getSeriesNftInfoBo
(
routerType
,
skuId
);
GalaxySeriesNftInfoBo
seriesNftInfoBo
=
this
.
getSeriesNftInfoBo
(
routerType
,
skuId
);
seriesNftInfoBo
.
setNftCrtCount
(
seriesNftInfoBo
.
getNftCrtCount
()+
1
);
seriesNftInfoBo
.
setNftCrtCount
(
seriesNftInfoBo
.
getNftCrtCount
()+
1
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftInfoBo
,
keyExpireTime
);
this
.
getRedisUtil
().
set
(
GalaxyConstant
.
REDIS_KEY_GALAXY_SERIES_NFT
.
concat
(
routerType
).
concat
(
":"
)
+
skuId
,
seriesNftInfoBo
);
Query
query
=
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
skuId
));
Query
query
=
Query
.
query
(
Criteria
.
where
(
"skuId"
).
is
(
skuId
));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesNftInfoBo
)));
Update
update
=
Update
.
fromDocument
(
Document
.
parse
(
JsonUtils
.
toJson
(
seriesNftInfoBo
)));
...
...
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