记得上下班打卡 | 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
ebbb4c9b
Commit
ebbb4c9b
authored
Mar 06, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交 redis
parent
b787455b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+7
-4
GoblinRedisUtils.java
...a/com/liquidnet/service/order/utils/GoblinRedisUtils.java
+3
-2
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
ebbb4c9b
...
...
@@ -378,7 +378,8 @@ public class GoblinRedisUtils {
public
GoblinGoodsInfoVo
getGoodsInfoVo
(
String
spuId
)
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
spuId
);
if
(
pre
!=
null
&&
pre
.
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())[
0
]);
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
);
...
...
@@ -397,7 +398,7 @@ public class GoblinRedisUtils {
vo
.
setSpuId
(
marketVo
.
getSpuId
());
List
<
String
>
skuIdList
=
CollectionUtil
.
linkedListString
();
for
(
String
skuIds
:
vo
.
getSkuIdList
())
{
skuIdList
.
add
(
skuIds
.
concat
(
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())
[
1
]));
skuIdList
.
add
(
skuIds
.
concat
(
pre
).
concat
(
spuSplitArr
[
1
]));
}
vo
.
setSkuIdList
(
skuIdList
);
vo
.
setPriceGe
(
marketVo
.
getPriceGe
());
...
...
@@ -417,7 +418,8 @@ public class GoblinRedisUtils {
public
GoblinGoodsInfoVo
getGoodsInfoVoByUnShelves
(
String
spuId
)
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
spuId
);
if
(
pre
!=
null
&&
pre
.
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_UNSHELVES
.
concat
(
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())[
0
]);
String
[]
spuSplitArr
=
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
());
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_UNSHELVES
.
concat
(
spuSplitArr
[
0
]);
GoblinGoodsInfoVo
vo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getGoodsInfoVo
(
spuId
)))
{
redisUtil
.
set
(
rk
,
vo
);
...
...
@@ -436,7 +438,7 @@ public class GoblinRedisUtils {
vo
.
setSpuId
(
marketVo
.
getSpuId
());
List
<
String
>
skuIdList
=
CollectionUtil
.
linkedListString
();
for
(
String
skuIds
:
vo
.
getSkuIdList
())
{
skuIdList
.
add
(
skuIds
.
concat
(
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())
[
1
]));
skuIdList
.
add
(
skuIds
.
concat
(
pre
).
concat
(
spuSplitArr
[
1
]));
}
vo
.
setSkuIdList
(
skuIdList
);
vo
.
setPriceGe
(
marketVo
.
getPriceGe
());
...
...
@@ -474,6 +476,7 @@ public class GoblinRedisUtils {
public
GoblinGoodsSkuInfoVo
getGoodsSkuInfoVo
(
String
skuId
)
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
skuId
);
if
(
pre
!=
null
&&
pre
.
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_SKU
.
concat
(
skuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())[
0
]);
GoblinGoodsSkuInfoVo
vo
=
(
GoblinGoodsSkuInfoVo
)
redisUtil
.
get
(
rk
);
if
(
null
==
vo
&&
null
!=
(
vo
=
goblinMongoUtils
.
getGoodsSkuInfoVo
(
skuId
)))
{
...
...
liquidnet-bus-service/liquidnet-service-order/liquidnet-service-order-impl/src/main/java/com/liquidnet/service/order/utils/GoblinRedisUtils.java
View file @
ebbb4c9b
...
...
@@ -72,7 +72,8 @@ public class GoblinRedisUtils {
public
GoblinGoodsInfoVo
getGoodsInfoVo
(
String
spuId
)
{
String
pre
=
GoblinStatusConst
.
MarketPreStatus
.
getPre
(
spuId
);
if
(
pre
!=
null
&&
pre
.
equals
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
()))
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())[
0
]);
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
);
...
...
@@ -91,7 +92,7 @@ public class GoblinRedisUtils {
vo
.
setSpuId
(
marketVo
.
getSpuId
());
List
<
String
>
skuIdList
=
CollectionUtil
.
linkedListString
();
for
(
String
skuIds
:
vo
.
getSkuIdList
())
{
skuIdList
.
add
(
skuIds
.
concat
(
spuId
.
split
(
GoblinStatusConst
.
MarketPreStatus
.
MARKET_PRE_ZHENGZAI
.
getValue
())
[
1
]));
skuIdList
.
add
(
skuIds
.
concat
(
pre
).
concat
(
spuSplitArr
[
1
]));
}
vo
.
setSkuIdList
(
skuIdList
);
vo
.
setPriceGe
(
marketVo
.
getPriceGe
());
...
...
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