记得上下班打卡 | 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;
import cn.binarywang.wx.miniapp.message.WxMaMessageRouter;
import com.liquidnet.service.sweet.handler.ApplySubscribeHandler;
import com.liquidnet.service.sweet.handler.ApplyUnsubscribeHandler;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -16,6 +17,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
import javax.annotation.PostConstruct;
@Configuration
@Slf4j
public class WechatMaConfigure {
private static String appletAppidZhengzai;
private static String appletSecretZhengzai;
......@@ -80,9 +82,9 @@ public class WechatMaConfigure {
private StringRedisTemplate stringRedisTemplate;
@Autowired
private ApplySubscribeHandler unsubscribeHandler;
private ApplySubscribeHandler subscribeHandler;
@Autowired
private ApplyUnsubscribeHandler subscribeHandler;
private ApplyUnsubscribeHandler unsubscribeHandler;
@PostConstruct
public void init() {
......@@ -175,6 +177,7 @@ public class WechatMaConfigure {
}
public WxMaMessageRouter messageRouter(Integer type) {
log.info("messageRouter1");
WxMaMessageRouter router = getWxMaMessageRouter(type);
// 消息去重
// router.setMessageDuplicateChecker(wxMessageInMemoryDuplicateChecker);
......@@ -184,17 +187,19 @@ public class WechatMaConfigure {
.event("subscribe_msg_popup_event")
.handler(subscribeHandler)
.end();
log.info("messageRouter2");
router.rule().async(false)
.content("订阅消息")
.handler(subscribeHandler)
.end();
log.info("messageRouter3");
// 取消订阅事件
router.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
.event("subscribe_msg_popup_event")
.handler(unsubscribeHandler)
.end();
router.rule().async(false)
.content("订阅消息")
.handler(subscribeHandler)
.end();
log.info("messageRouter4");
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