记得上下班打卡 | 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
a15aa019
Commit
a15aa019
authored
Apr 24, 2022
by
GaoHu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exit
parent
f0a1d8e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
GoblinGoodsAnticipateServiceImpl.java
...goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
+9
-5
GoblinRedisUtils.java
...a/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
+2
-2
No files found.
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/GoblinGoodsAnticipateServiceImpl.java
View file @
a15aa019
...
...
@@ -167,7 +167,8 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//goblinMongoUtils.setGoblinGoodsAnticipateShareVo(goblinGoodsAnticipateShareVo);
//redis缓存
goblinRedisUtils
.
setShare
(
skuId
,
uid
,
sid
);
Duration
between
=
Duration
.
between
(
valueBySkuId
.
getAboutStartDate
(),
valueBySkuId
.
getAboutEndDate
());
goblinRedisUtils
.
setShare
(
skuId
,
uid
,
sid
,
between
.
toDays
());
//redis存储用户分享
goblinRedisUtils
.
setShareVo
(
goblinGoodsAnticipateShareVo
);
...
...
@@ -193,7 +194,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//查询是否可以预约
GoblinGoodsAnticipateShareVo
shareVo
=
goblinRedisUtils
.
getShareVo
(
sid
);
if
(
shareVo
==
null
)
{
return
ResponseDto
.
failure
(
"分享不存在!"
);
return
ResponseDto
.
failure
(
"分享不存在
,
!"
);
}
Integer
integer
=
GoblinAnticipateUtils
.
setState
(
shareVo
.
getAboutStartDate
(),
shareVo
.
getAboutEndDate
());
if
(
integer
!=
null
&&
!
integer
.
equals
(
1
))
{
...
...
@@ -254,9 +255,12 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
public
ResponseDto
<
HelpValueVo
>
getHelpValue
(
String
sid
)
{
//获取分享助力信息
GoblinGoodsAnticipateShareVo
shareVo
=
goblinRedisUtils
.
getShareVo
(
sid
);
HelpValueVo
helpValueVo
=
HelpValueVo
.
getNew
();
helpValueVo
.
copy
(
shareVo
);
return
ResponseDto
.
success
(
helpValueVo
);
if
(
shareVo
!=
null
)
{
HelpValueVo
helpValueVo
=
HelpValueVo
.
getNew
();
helpValueVo
.
copy
(
shareVo
);
return
ResponseDto
.
success
(
helpValueVo
);
}
return
ResponseDto
.
failure
(
"该助力不存在!"
);
}
@Override
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/util/GoblinRedisUtils.java
View file @
a15aa019
...
...
@@ -160,9 +160,9 @@ public class GoblinRedisUtils {
/**
* 存用户助力关联
*/
public
void
setShare
(
String
skuId
,
String
uid
,
String
sid
)
{
public
void
setShare
(
String
skuId
,
String
uid
,
String
sid
,
Long
day
)
{
String
key
=
GoblinRedisConst
.
ANTICIPATE_SHARE_UID_SKUID
.
concat
(
uid
).
concat
(
":"
).
concat
(
skuId
);
redisUtil
.
set
(
key
,
sid
);
redisUtil
.
set
(
key
,
sid
,(
day
+
1
)
*
60
*
60
*
24
);
}
/**
...
...
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