Commit 2660a7c nifury
committed
1 parent f0e04ea commit 2660a7c Copy full SHA for 2660a7c
File tree 1 file changed +10
-12
lines changed
src/main/java/com/github/niefy/modules/wx/service/impl
1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -44,19 +44,17 @@ public class TemplateMsgServiceImpl implements TemplateMsgService {
44
44
@ Override
45
45
@ Async
46
46
public void sendTemplateMsg (WxMpTemplateMessage msg ,String appid ) {
47
- TaskExcutor .submit (() -> {
48
- String result ;
49
- try {
50
- wxService .switchover (appid );
51
- result = wxService .getTemplateMsgService ().sendTemplateMsg (msg );
52
- } catch (WxErrorException e ) {
53
- result = e .getMessage ();
54
- }
47
+ String result ;
48
+ try {
49
+ wxService .switchover (appid );
50
+ result = wxService .getTemplateMsgService ().sendTemplateMsg (msg );
51
+ } catch (WxErrorException e ) {
52
+ result = e .getMessage ();
53
+ }
55
54
56
- //保存发送日志
57
- TemplateMsgLog log = new TemplateMsgLog (msg ,appid , result );
58
- templateMsgLogService .addLog (log );
59
- });
55
+ //保存发送日志
56
+ TemplateMsgLog log = new TemplateMsgLog (msg ,appid , result );
57
+ templateMsgLogService .addLog (log );
60
58
}
61
59
62
60
@ Override
You can’t perform that action at this time.
0 commit comments