|
1 | 1 | package com.github.service.impl; |
2 | 2 |
|
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.WxMpXmlMessage; |
| 12 | +import me.chanjar.weixin.mp.bean.WxMpXmlOutMessage; |
| 13 | +import me.chanjar.weixin.mp.bean.result.WxMpUser; |
9 | 14 | import org.apache.http.HttpEntity; |
10 | 15 | import org.apache.http.NameValuePair; |
11 | 16 | import org.apache.http.client.ClientProtocolException; |
|
22 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 28 | import org.springframework.stereotype.Service; |
24 | 29 |
|
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.WxMpXmlMessage; |
35 | | -import me.chanjar.weixin.mp.bean.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; |
37 | 34 |
|
38 | 35 | /** |
39 | 36 | * Created by FirenzesEagle on 2016/5/30 0030. |
@@ -106,8 +103,8 @@ public void refreshRouter() { |
106 | 103 | // 关注事件 |
107 | 104 | newRouter.rule().async(false).msgType(WxConsts.XML_MSG_EVENT) |
108 | 105 | .event(WxConsts.EVT_SUBSCRIBE).handler(this.subscribeHandler) |
109 | | - .end(); |
110 | | - // 默认 |
| 106 | + .next(); |
| 107 | + // 默认,转发消息给客服人员 |
111 | 108 | newRouter.rule().async(false).handler(this.msgHandler).end(); |
112 | 109 | this.router = newRouter; |
113 | 110 | } |
|
0 commit comments