记得上下班打卡 | 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
9606a7ef
Commit
9606a7ef
authored
Aug 11, 2022
by
zhengfuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFT支持降级查询
parent
983cfb1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
KylinRedisUtils.java
...va/com/liquidnet/service/kylin/utils/KylinRedisUtils.java
+11
-0
No files found.
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/utils/KylinRedisUtils.java
View file @
9606a7ef
...
...
@@ -22,6 +22,8 @@ import java.util.stream.Collectors;
public
class
KylinRedisUtils
{
@Autowired
RedisUtil
redisUtil
;
@Autowired
GoblinMongodbUtils
goblinMongoUtils
;
private
int
randomMax
=
10
;
...
...
@@ -41,11 +43,17 @@ public class KylinRedisUtils {
String
[]
spuSplitArr
=
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
());
String
rk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuSplitArr
[
0
]);
GoblinGoodsInfoVo
vo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getGoodsInfoVo
(
spuId
)))
{
redisUtil
.
set
(
rk
,
vo
);
}
if
(
vo
==
null
)
{
return
vo
;
}
String
marketrk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
);
GoblinGoodsInfoVo
marketVo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
marketrk
);
if
(
null
==
marketVo
&&
null
!=
(
marketVo
=
goblinMongoUtils
.
getGoodsInfoVo
(
spuId
)))
{
redisUtil
.
set
(
marketrk
,
marketVo
);
}
if
(
marketVo
==
null
)
{
return
marketVo
;
}
...
...
@@ -63,6 +71,9 @@ public class KylinRedisUtils {
}
else
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
);
GoblinGoodsInfoVo
vo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getGoodsInfoVo
(
spuId
)))
{
redisUtil
.
set
(
rk
,
vo
);
}
return
vo
;
}
}
...
...
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