记得上下班打卡 | git大法好,push需谨慎

Commit 075ae83a authored by jiangxiulong's avatar jiangxiulong

add table applet

parent b5fe0fa9
...@@ -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 unsubscribeHandler; private ApplySubscribeHandler subscribeHandler;
@Autowired @Autowired
private ApplyUnsubscribeHandler subscribeHandler; private ApplyUnsubscribeHandler unsubscribeHandler;
@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;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment