记得上下班打卡 | 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
2effcdfe
Commit
2effcdfe
authored
Dec 08, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
活动互斥
parent
ad431924
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
TextMsgHandler.java
...a/com/liquidnet/service/sweet/handler/TextMsgHandler.java
+2
-1
WechatUsersRedisUtils.java
.../liquidnet/service/sweet/utils/WechatUsersRedisUtils.java
+8
-0
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/handler/TextMsgHandler.java
View file @
2effcdfe
...
@@ -53,6 +53,7 @@ public class TextMsgHandler implements WxMpMessageHandler {
...
@@ -53,6 +53,7 @@ public class TextMsgHandler implements WxMpMessageHandler {
// 2021草莓音乐节海报活动
// 2021草莓音乐节海报活动
if
(
StringUtil
.
trim
(
content
).
equals
(
"白日梦"
))
{
if
(
StringUtil
.
trim
(
content
).
equals
(
"白日梦"
))
{
redisUtils
.
delSweetMaoDengOpen
(
openId
);
redisUtils
.
setStrawberryPosterClick
(
wxMessage
.
getFromUser
(),
10
*
60
);
redisUtils
.
setStrawberryPosterClick
(
wxMessage
.
getFromUser
(),
10
*
60
);
return
WxMpXmlOutMessage
.
TEXT
().
content
(
"你梦中的草莓音乐节会有怎样的阵容?\n"
+
return
WxMpXmlOutMessage
.
TEXT
().
content
(
"你梦中的草莓音乐节会有怎样的阵容?\n"
+
...
@@ -94,6 +95,7 @@ public class TextMsgHandler implements WxMpMessageHandler {
...
@@ -94,6 +95,7 @@ public class TextMsgHandler implements WxMpMessageHandler {
if
(
content
.
equals
(
"猫登天空"
))
{
if
(
content
.
equals
(
"猫登天空"
))
{
redisUtils
.
delStrawberryPosterClick
(
openId
);
redisUtils
.
setSweetMaoDengOpen
(
openId
,
10
*
60
);
redisUtils
.
setSweetMaoDengOpen
(
openId
,
10
*
60
);
WxMpXmlOutTextMessage
build
=
WxMpXmlOutMessage
.
TEXT
().
content
(
"没想到吧,你的喵星人主子在玩耍逗喵棒之外,也有一个隐秘的音乐人分身呢!\n"
+
WxMpXmlOutTextMessage
build
=
WxMpXmlOutMessage
.
TEXT
().
content
(
"没想到吧,你的喵星人主子在玩耍逗喵棒之外,也有一个隐秘的音乐人分身呢!\n"
+
"看看TA到底是怎样一只音乐喵!\n"
+
"看看TA到底是怎样一只音乐喵!\n"
+
...
@@ -127,7 +129,6 @@ public class TextMsgHandler implements WxMpMessageHandler {
...
@@ -127,7 +129,6 @@ public class TextMsgHandler implements WxMpMessageHandler {
.
fromUser
(
wxMessage
.
getToUser
()).
toUser
(
wxMessage
.
getFromUser
())
.
fromUser
(
wxMessage
.
getToUser
()).
toUser
(
wxMessage
.
getFromUser
())
.
build
();
.
build
();
return
build
;
return
build
;
}
}
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/WechatUsersRedisUtils.java
View file @
2effcdfe
...
@@ -89,6 +89,10 @@ public class WechatUsersRedisUtils {
...
@@ -89,6 +89,10 @@ public class WechatUsersRedisUtils {
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_STRAWBERRY_POSTER_CLICK
.
concat
(
openId
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_STRAWBERRY_POSTER_CLICK
.
concat
(
openId
);
redisUtil
.
set
(
redisKey
,
1
,
time
);
redisUtil
.
set
(
redisKey
,
1
,
time
);
}
}
public
void
delStrawberryPosterClick
(
String
openId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_STRAWBERRY_POSTER_CLICK
.
concat
(
openId
);
redisUtil
.
del
(
redisKey
);
}
public
boolean
getStrawberryPosterClick
(
String
openId
)
{
public
boolean
getStrawberryPosterClick
(
String
openId
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_STRAWBERRY_POSTER_CLICK
.
concat
(
openId
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_STRAWBERRY_POSTER_CLICK
.
concat
(
openId
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
...
@@ -142,6 +146,10 @@ public class WechatUsersRedisUtils {
...
@@ -142,6 +146,10 @@ public class WechatUsersRedisUtils {
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_WECHAT_MAODENG_OPEN_POSTER
.
concat
(
fromUser
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_WECHAT_MAODENG_OPEN_POSTER
.
concat
(
fromUser
);
redisUtil
.
set
(
redisKey
,
"1"
,
time
);
redisUtil
.
set
(
redisKey
,
"1"
,
time
);
}
}
public
void
delSweetMaoDengOpen
(
String
fromUser
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_WECHAT_MAODENG_OPEN_POSTER
.
concat
(
fromUser
);
redisUtil
.
del
(
redisKey
);
}
//临时数据中转
//临时数据中转
public
void
setSweetMaoDengTransfer
(
SweetMaoDengVo
sweetMaoDengVo
,
long
expire
)
{
public
void
setSweetMaoDengTransfer
(
SweetMaoDengVo
sweetMaoDengVo
,
long
expire
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_WECHAT_MAODENG_POSTER_TRANSFER
.
concat
(
sweetMaoDengVo
.
getUserId
());
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_WECHAT_MAODENG_POSTER_TRANSFER
.
concat
(
sweetMaoDengVo
.
getUserId
());
...
...
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