记得上下班打卡 | 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
6b7486cf
Commit
6b7486cf
authored
Feb 16, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复价格负数bug
parent
f3e8f786
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+24
-15
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 @
6b7486cf
...
...
@@ -311,6 +311,7 @@ public class GoblinRedisUtils {
public
void
delGoodsInfoVo
(
String
spuId
)
{
redisUtil
.
del
(
GoblinRedisConst
.
BASIC_GOODS
.
concat
(
spuId
));
}
public
void
delGoodsInfoVoByUnShelves
(
String
spuId
)
{
redisUtil
.
del
(
GoblinRedisConst
.
BASIC_GOODS_UNSHELVES
.
concat
(
spuId
));
}
...
...
@@ -333,6 +334,7 @@ public class GoblinRedisUtils {
}
return
vo
;
}
public
GoblinGoodsInfoVo
getGoodsInfoVoByUnShelves
(
String
spuId
)
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_UNSHELVES
.
concat
(
spuId
);
GoblinGoodsInfoVo
vo
=
(
GoblinGoodsInfoVo
)
redisUtil
.
get
(
rk
);
...
...
@@ -362,6 +364,7 @@ public class GoblinRedisUtils {
public
void
delGoodsSkuInfoVo
(
String
skuId
)
{
redisUtil
.
del
(
GoblinRedisConst
.
BASIC_GOODS_SKU
.
concat
(
skuId
));
}
public
void
delGoodsSkuInfoVoByUnShelves
(
String
skuId
)
{
redisUtil
.
del
(
GoblinRedisConst
.
BASIC_GOODS_SKU_UNSHELVES
.
concat
(
skuId
));
}
...
...
@@ -384,6 +387,7 @@ public class GoblinRedisUtils {
}
return
vo
;
}
public
GoblinGoodsSkuInfoVo
getGoodsSkuInfoVoByUnShelves
(
String
skuId
)
{
String
rk
=
GoblinRedisConst
.
BASIC_GOODS_SKU_UNSHELVES
.
concat
(
skuId
);
GoblinGoodsSkuInfoVo
vo
=
(
GoblinGoodsSkuInfoVo
)
redisUtil
.
get
(
rk
);
...
...
@@ -600,7 +604,7 @@ public class GoblinRedisUtils {
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_BUY_COUNT
.
concat
(
uid
+
":skuId:"
+
skuId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
obj
==
null
)
{
return
null
;
return
0
;
}
else
{
return
(
Integer
)
obj
;
}
...
...
@@ -725,7 +729,7 @@ public class GoblinRedisUtils {
public
void
removeGoblinOrder
(
String
randomKey
,
String
orderId
)
{
if
(
randomKey
==
null
)
{
for
(
int
i
=
0
;
i
<
randomMax
;
i
++)
{
randomKey
=
i
+
""
;
randomKey
=
i
+
""
;
String
redisKey
=
GoblinRedisConst
.
REDIS_GOBLIN_ORDER_UN_PAY
.
concat
(
randomKey
);
List
<
String
>
list
=
getUnPayOrder
(
randomKey
);
if
(
list
.
contains
(
orderId
))
{
...
...
@@ -864,42 +868,47 @@ public class GoblinRedisUtils {
list
.
add
(
backOrderId
);
redisUtil
.
set
(
redisKey
,
list
);
}
//商品上架、下架、删除 调用的方法
public
void
deleteKeyForSelectGoods
(){
public
void
deleteKeyForSelectGoods
()
{
redisUtil
.
del
(
GoblinRedisConst
.
SELECT_GOODS_SPUIDS
);
redisUtil
.
del
(
GoblinRedisConst
.
SELECT_GOODS_PAGE1
);
}
// banner 降级
public
List
<
GoblinFrontBanner
>
getListBanner
()
{
List
<
GoblinFrontBanner
>
vo
=
(
List
<
GoblinFrontBanner
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_TOP_BANNER
);
if
(
null
==
vo
)
{
public
List
<
GoblinFrontBanner
>
getListBanner
()
{
List
<
GoblinFrontBanner
>
vo
=
(
List
<
GoblinFrontBanner
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_TOP_BANNER
);
if
(
null
==
vo
)
{
//降级
return
goblinMongoUtils
.
getListBanner
();
}
return
vo
;
}
public
List
<
GoblinFrontBanner
>
getMiddleBanner
()
{
List
<
GoblinFrontBanner
>
vo
=
(
List
<
GoblinFrontBanner
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_MIDDLE_BANNER
);
if
(
null
==
vo
)
{
public
List
<
GoblinFrontBanner
>
getMiddleBanner
()
{
List
<
GoblinFrontBanner
>
vo
=
(
List
<
GoblinFrontBanner
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_MIDDLE_BANNER
);
if
(
null
==
vo
)
{
//降级
return
goblinMongoUtils
.
getMiddleBanner
();
}
return
vo
;
}
// 热词降级
public
List
<
GoblinFrontHotWord
>
getHotWord
()
{
List
<
GoblinFrontHotWord
>
vo
=
(
List
<
GoblinFrontHotWord
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_HOTWORD
);
if
(
null
==
vo
)
{
public
List
<
GoblinFrontHotWord
>
getHotWord
()
{
List
<
GoblinFrontHotWord
>
vo
=
(
List
<
GoblinFrontHotWord
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_HOTWORD
);
if
(
null
==
vo
)
{
//降级
return
goblinMongoUtils
.
getHotWord
();
}
return
vo
;
}
// 导航栏 降级
// List<GoblinFrontNavigation> list = (List<GoblinFrontNavigation>) redisUtil.get(GoblinRedisConst.FRONT_NAVIGATION);
public
List
<
GoblinFrontNavigation
>
getNavigation
()
{
List
<
GoblinFrontNavigation
>
vo
=
(
List
<
GoblinFrontNavigation
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_NAVIGATION
);
if
(
null
==
vo
)
{
public
List
<
GoblinFrontNavigation
>
getNavigation
()
{
List
<
GoblinFrontNavigation
>
vo
=
(
List
<
GoblinFrontNavigation
>)
redisUtil
.
get
(
GoblinRedisConst
.
FRONT_NAVIGATION
);
if
(
null
==
vo
)
{
//降级
return
goblinMongoUtils
.
getNavigation
();
}
...
...
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