niefy / wx-api Goto Github PK
View Code? Open in Web Editor NEW🔥微信公众号管理系统,包含公众号菜单管理🗄、自动回复🗨、素材管理📂、模板消息☘、粉丝管理🤹♂️等功能,前后端都开源免费🛩
Home Page: https://github.com/niefy/wx-manage
License: Apache License 2.0
🔥微信公众号管理系统,包含公众号菜单管理🗄、自动回复🗨、素材管理📂、模板消息☘、粉丝管理🤹♂️等功能,前后端都开源免费🛩
Home Page: https://github.com/niefy/wx-manage
License: Apache License 2.0
从微信公众号中发送文本消息,在XssFilter里面调试能正常接收xml信息
但是流转到WxMpPortalController.post 始终得不到xml数据,好像是request.getInputStream()已经使用过导致的
用户关注时触发subscribe事件,但此时获取到的appid还是初始值“default”。
导致的bug是
数据库有合法的1个公众号配置,菜单/自动回复等功能均正常。运行环境均为文档标准。
部分log信息:
2020-06-27 18:45:43.207 INFO 8208 --- [ool-1-thread-22] c.g.n.m.wx.handler.SubscribeHandler : 新关注用户 OPENID: oECvw1AiW91g2hHjr6KO2XauH86E,事件:
2020-06-27 18:45:43.209 INFO 8208 --- [ool-1-thread-22] c.g.n.m.wx.handler.SubscribeHandler : APP ID: default
2020-06-27 18:45:43.210 INFO 8208 --- [ool-1-thread-22] c.g.n.m.w.s.impl.WxUserServiceImpl : 更新用户信息,openid=oECvw1AiW91g2hHjr6KO2XauH86E
2020-06-27 18:45:43.210 INFO 8208 --- [ool-1-thread-22] c.g.n.m.w.s.impl.WxUserServiceImpl : 更新用户信息,appid=default
2020-06-27 18:52:05.883 INFO 8208 --- [io-8088-exec-16] c.g.niefy.modules.wx.handler.MsgHandler : 文本消息: APP ID: wx34d5de805517a776
显示appid的几行是在获取到appid后紧接着输出的。
目前用户关注或者取消关注,事件推送均不能正常推送。经查,原因是根据https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html 所示,toUser是指开发者微信号,而非代码中的【开发者APPID】。
异常如下:
`2020-06-21 12:59:27.998 ERROR 24000 --- [nio-8088-exec-6] c.g.n.c.exception.RRExceptionHandler : Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value. Expected the discarded bits to be zero.
java.lang.IllegalArgumentException: Last encoded character (before the paddings if any) is a valid base 64 alphabet but not a possible value. Expected the discarded bits to be zero.
at org.apache.commons.codec.binary.Base64.validateCharacter(Base64.java:803)
at org.apache.commons.codec.binary.Base64.decode(Base64.java:482)
at org.apache.commons.codec.binary.BaseNCodec.decode(BaseNCodec.java:481)
at org.apache.commons.codec.binary.BaseNCodec.decode(BaseNCodec.java:465)
at org.apache.commons.codec.binary.Base64.decodeBase64(Base64.java:699)
at me.chanjar.weixin.mp.util.crypto.WxMpCryptUtil.(WxMpCryptUtil.java:42)
at me.chanjar.weixin.mp.bean.message.WxMpXmlMessage.fromEncryptedXml(WxMpXmlMessage.java:708)
at com.github.niefy.modules.wx.controller.WxMpPortalController.post(WxMpPortalController.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:879)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.github.niefy.common.xss.XssFilter.doFilter(XssFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)`
作者你好,有点问题想请教你。对于您的项目 https://github.com/niefy/wx-api/blob/master/src/main/java/com/github/niefy/modules/wx/service/impl/TemplateMsgServiceImpl.java这一个service中,sendTemplateMsg方法使用用了 @async 注解,这个注解的本质不是使用了线程池吗?为什么代码里面还要手动利用线程池去执行发送消息的操作?经过尝试,如果去除 TaskExcutor.submit(),这个函数也能异步执行的,那这么写的目的是什么呢?望释疑,万分感谢
数据多了之后查询特别慢。
可以拉我吗?QQ:597009281
目前发送模板消息是利用定时器推送到数据库日志表,但是现在发现,模板消息是发送成功了,但是发送日志不能记录。
您好,请问这个项目后期不打算版本迭代更新了吗,好像很久都没发布master啊
个人订阅号自动回复不生效怎么解决
当前项目只能管理1个公众号对吧
希望能在yml内增加配置项,标明用户接入的公众号类别(比如个人订阅号、企业或组织的订阅号/服务号),并在service内根据配置项注册不同的handler,避免个人版订阅号呼叫到未授权的wx客服接口。
自动回复模块中,如果作用所有公众号且为非文本消息的素材,回复有问题
您好,请问是不是现在只能根据对应的事件key或者内容关键字去进行匹配性质的自动回复,而不能设置一个默认的全局针对所有用户的自动回复消息呢,就是比如用户随便发一个信息过来,后台返回“已收到您的消息”,谢谢
缓存五分钟过期,如果修改完登录密码,新密码不会马上可用,老密码五分钟内可以正常登录。
比如前端发送请求:https://aaa.com/a?t=1&t1=23
后台接收:https://aaa.com/a?t=1&t1=23
导致微信菜单点击没反应
腾讯2022年2月28日下线永久图文素材相关接口,需要使用草稿箱接口管理素材;
https://mp.weixin.qq.com/cgi-bin/announce?action=getannouncement&announce_id=11644831863qFQSh&version=&lang=zh_CN
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.