File tree 3 files changed +13
-1
lines changed
weixin-java-cp/src/main/java/me/chanjar/weixin/cp
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,13 @@ public interface WxCpService {
165
165
*/
166
166
WxSession getSession (String id , boolean create );
167
167
168
+ /**
169
+ * 获取WxSessionManager 对象
170
+ *
171
+ * @return WxSessionManager
172
+ */
173
+ WxSessionManager getSessionManager ();
174
+
168
175
/**
169
176
* <pre>
170
177
* 设置WxSessionManager,只有当需要使用个性化的WxSessionManager的时候才需要调用此方法,
Original file line number Diff line number Diff line change @@ -285,6 +285,11 @@ public void setSessionManager(WxSessionManager sessionManager) {
285
285
this .sessionManager = sessionManager ;
286
286
}
287
287
288
+ @ Override
289
+ public WxSessionManager getSessionManager () {
290
+ return this .sessionManager ;
291
+ }
292
+
288
293
@ Override
289
294
public String replaceParty (String mediaId ) throws WxErrorException {
290
295
String url = "https://qyapi.weixin.qq.com/cgi-bin/batch/replaceparty" ;
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ public WxCpMessageRouter(WxCpService wxCpService) {
73
73
this .wxCpService = wxCpService ;
74
74
this .executorService = Executors .newFixedThreadPool (DEFAULT_THREAD_POOL_SIZE );
75
75
this .messageDuplicateChecker = new WxMessageInMemoryDuplicateChecker ();
76
- this .sessionManager = new StandardSessionManager ();
76
+ this .sessionManager = wxCpService . getSessionManager ();
77
77
this .exceptionHandler = new LogExceptionHandler ();
78
78
}
79
79
You can’t perform that action at this time.
0 commit comments