Skip to content

Commit ff06a60

Browse files
committed
subscribe message bug fix
1 parent 4b8a342 commit ff06a60

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

src/main/java/com/github/service/impl/CoreServiceImpl.java

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
package com.github.service.impl;
22

3-
import java.io.IOException;
4-
import java.nio.charset.StandardCharsets;
5-
import java.util.List;
6-
7-
import javax.annotation.PostConstruct;
8-
3+
import com.github.handler.LogHandler;
4+
import com.github.handler.MsgHandler;
5+
import com.github.handler.SubscribeHandler;
6+
import com.github.service.CoreService;
7+
import me.chanjar.weixin.common.api.WxConsts;
8+
import me.chanjar.weixin.common.exception.WxErrorException;
9+
import me.chanjar.weixin.mp.api.WxMpMessageRouter;
10+
import me.chanjar.weixin.mp.api.WxMpService;
11+
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
12+
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
13+
import me.chanjar.weixin.mp.bean.result.WxMpUser;
914
import org.apache.http.HttpEntity;
1015
import org.apache.http.NameValuePair;
1116
import org.apache.http.client.ClientProtocolException;
@@ -22,18 +27,10 @@
2227
import org.springframework.beans.factory.annotation.Autowired;
2328
import org.springframework.stereotype.Service;
2429

25-
import com.github.handler.LogHandler;
26-
import com.github.handler.MsgHandler;
27-
import com.github.handler.SubscribeHandler;
28-
import com.github.service.CoreService;
29-
30-
import me.chanjar.weixin.common.api.WxConsts;
31-
import me.chanjar.weixin.common.exception.WxErrorException;
32-
import me.chanjar.weixin.mp.api.WxMpMessageRouter;
33-
import me.chanjar.weixin.mp.api.WxMpService;
34-
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
35-
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
36-
import me.chanjar.weixin.mp.bean.result.WxMpUser;
30+
import javax.annotation.PostConstruct;
31+
import java.io.IOException;
32+
import java.nio.charset.StandardCharsets;
33+
import java.util.List;
3734

3835
/**
3936
* Created by FirenzesEagle on 2016/5/30 0030.
@@ -106,7 +103,7 @@ public void refreshRouter() {
106103
// 关注事件
107104
newRouter.rule().async(false).msgType(WxConsts.XML_MSG_EVENT)
108105
.event(WxConsts.EVT_SUBSCRIBE).handler(this.subscribeHandler)
109-
.next();
106+
.end();
110107
// 默认,转发消息给客服人员
111108
newRouter.rule().async(false).handler(this.msgHandler).end();
112109
this.router = newRouter;

0 commit comments

Comments
 (0)