记得上下班打卡 | 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
075ae83a
Commit
075ae83a
authored
Nov 22, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add table applet
parent
b5fe0fa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
WechatMaConfigure.java
...com/liquidnet/service/sweet/config/WechatMaConfigure.java
+12
-7
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/config/WechatMaConfigure.java
View file @
075ae83a
...
@@ -6,6 +6,7 @@ import cn.binarywang.wx.miniapp.config.impl.WxMaRedisBetterConfigImpl;
...
@@ -6,6 +6,7 @@ import cn.binarywang.wx.miniapp.config.impl.WxMaRedisBetterConfigImpl;
import
cn.binarywang.wx.miniapp.message.WxMaMessageRouter
;
import
cn.binarywang.wx.miniapp.message.WxMaMessageRouter
;
import
com.liquidnet.service.sweet.handler.ApplySubscribeHandler
;
import
com.liquidnet.service.sweet.handler.ApplySubscribeHandler
;
import
com.liquidnet.service.sweet.handler.ApplyUnsubscribeHandler
;
import
com.liquidnet.service.sweet.handler.ApplyUnsubscribeHandler
;
import
lombok.extern.slf4j.Slf4j
;
import
me.chanjar.weixin.common.api.WxConsts
;
import
me.chanjar.weixin.common.api.WxConsts
;
import
me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps
;
import
me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -16,6 +17,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
...
@@ -16,6 +17,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
@Configuration
@Configuration
@Slf4j
public
class
WechatMaConfigure
{
public
class
WechatMaConfigure
{
private
static
String
appletAppidZhengzai
;
private
static
String
appletAppidZhengzai
;
private
static
String
appletSecretZhengzai
;
private
static
String
appletSecretZhengzai
;
...
@@ -80,9 +82,9 @@ public class WechatMaConfigure {
...
@@ -80,9 +82,9 @@ public class WechatMaConfigure {
private
StringRedisTemplate
stringRedisTemplate
;
private
StringRedisTemplate
stringRedisTemplate
;
@Autowired
@Autowired
private
ApplySubscribeHandler
un
subscribeHandler
;
private
ApplySubscribeHandler
subscribeHandler
;
@Autowired
@Autowired
private
ApplyUnsubscribeHandler
subscribeHandler
;
private
ApplyUnsubscribeHandler
un
subscribeHandler
;
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
...
@@ -175,6 +177,7 @@ public class WechatMaConfigure {
...
@@ -175,6 +177,7 @@ public class WechatMaConfigure {
}
}
public
WxMaMessageRouter
messageRouter
(
Integer
type
)
{
public
WxMaMessageRouter
messageRouter
(
Integer
type
)
{
log
.
info
(
"messageRouter1"
);
WxMaMessageRouter
router
=
getWxMaMessageRouter
(
type
);
WxMaMessageRouter
router
=
getWxMaMessageRouter
(
type
);
// 消息去重
// 消息去重
// router.setMessageDuplicateChecker(wxMessageInMemoryDuplicateChecker);
// router.setMessageDuplicateChecker(wxMessageInMemoryDuplicateChecker);
...
@@ -184,17 +187,19 @@ public class WechatMaConfigure {
...
@@ -184,17 +187,19 @@ public class WechatMaConfigure {
.
event
(
"subscribe_msg_popup_event"
)
.
event
(
"subscribe_msg_popup_event"
)
.
handler
(
subscribeHandler
)
.
handler
(
subscribeHandler
)
.
end
();
.
end
();
log
.
info
(
"messageRouter2"
);
router
.
rule
().
async
(
false
)
.
content
(
"订阅消息"
)
.
handler
(
subscribeHandler
)
.
end
();
log
.
info
(
"messageRouter3"
);
// 取消订阅事件
// 取消订阅事件
router
.
rule
().
async
(
false
).
msgType
(
WxConsts
.
XmlMsgType
.
EVENT
)
router
.
rule
().
async
(
false
).
msgType
(
WxConsts
.
XmlMsgType
.
EVENT
)
.
event
(
"subscribe_msg_popup_event"
)
.
event
(
"subscribe_msg_popup_event"
)
.
handler
(
unsubscribeHandler
)
.
handler
(
unsubscribeHandler
)
.
end
();
.
end
();
log
.
info
(
"messageRouter4"
);
router
.
rule
().
async
(
false
)
.
content
(
"订阅消息"
)
.
handler
(
subscribeHandler
)
.
end
();
return
router
;
return
router
;
}
}
...
...
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