|
|
@@ -5,6 +5,8 @@ import com.mrxu.framework.common.util.StrFunc;
|
|
|
import com.mrxu.framework.common.weixin.msg.in.*;
|
|
|
import com.mrxu.framework.common.weixin.msg.in.event.*;
|
|
|
import com.mrxu.framework.common.weixin.msg.in.speech_recognition.InSpeechRecognitionResults;
|
|
|
+import com.mrxu.framework.common.xcx.msg.in.AuditFailMsg;
|
|
|
+import com.mrxu.framework.common.xcx.msg.in.AuditSuccessMsg;
|
|
|
import org.dom4j.Document;
|
|
|
import org.dom4j.DocumentException;
|
|
|
import org.dom4j.DocumentHelper;
|
|
|
@@ -56,6 +58,10 @@ public class InMsgParaser {
|
|
|
return parseInLinkMsg(root, toUserName, fromUserName, createTime, msgType);
|
|
|
if ("event".equals(msgType))
|
|
|
return parseInEvent(root, toUserName, fromUserName, createTime, msgType);
|
|
|
+ if ("weapp_audit_success".equals(msgType))
|
|
|
+ return parseInEvent(root, toUserName, fromUserName, createTime, msgType);
|
|
|
+ if ("weapp_audit_fail".equals(msgType))
|
|
|
+ return parseInEvent(root, toUserName, fromUserName, createTime, msgType);
|
|
|
throw new RuntimeException("无法识别的消息类型,请查阅微信公众平台开发文档");
|
|
|
}
|
|
|
|
|
|
@@ -182,7 +188,20 @@ public class InMsgParaser {
|
|
|
e.setStatus(root.elementText("Status"));
|
|
|
return e;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // 小程序审核通过
|
|
|
+ if ("weapp_audit_success".equals(event)) {
|
|
|
+ AuditSuccessMsg e = new AuditSuccessMsg(toUserName, fromUserName, createTime, msgType);
|
|
|
+ return e;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 小程序审核不通过
|
|
|
+ if ("weapp_audit_fail".equals(event)) {
|
|
|
+ AuditFailMsg e = new AuditFailMsg(toUserName, fromUserName, createTime, msgType);
|
|
|
+ e.setReason(root.elementText("Reason"));
|
|
|
+ e.setScreenShot(root.elementText("ScreenShot`"));
|
|
|
+ return e;
|
|
|
+ }
|
|
|
throw new RuntimeException("无法识别的事件类型,请查阅微信公众平台开发文档");
|
|
|
}
|
|
|
|