GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — #2400 WxMaMessage 增加TemplateId、SubscribeStatusString等相关属性 by dany1 · Pull Request #2477 · binarywang/WxJava

Conversation

@dany1

@dany1 dany1 commented Dec 31, 2021

Copy link
Copy Markdown

小程序端订阅消息之后,服务器会收到3种通知SubscribeMsgPopupEvent,SubscribeMsgChangeEvent,SubscribeMsgSentEvent,这三种通知是xml格式层级正常,如果是json格式的,三种类型的通知都叫做List,并且通知如果只有一条数据则List是对象,如果是多条数据List是数组
一条数据的时候是这样的
{ "ToUserName": "gh_123456789abc", "FromUserName": "o7esq5OI1Uej6Xixw1lA2H7XDVbc", "CreateTime": "1610968440", "MsgType": "event", "Event": "subscribe_msg_change_event", "List": { "TemplateId":"BEwX0BOT3MqK3Uc5oTU3CGBqzjpndk2jzUf7VfExd8", "SubscribeStatusString": "reject" } }
多条数据的时候是这样的
{ "ToUserName": "gh_123456789abc", "FromUserName": "o7esq5OI1Uej6Xixw1lA2H7XDVbc", "CreateTime": "1610968440", "MsgType": "event", "Event": "subscribe_msg_change_event", "List": [ { "TemplateId":"BEwX0BOT3MqK3Uc5oTU3CGBqzjpndk2jzUf7VfExd8", "SubscribeStatusString": "reject" },{ "TemplateId":"BEwX0BOT3MqK3Uc5oTU3CGBqzjpndk2jzUf7VfExd8", "SubscribeStatusString": "reject" }] }
在代码里面对这种情况做了兼容

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dany
*** 添加订阅消息 推送通知
1c86df1
@binarywang
binarywang merged commit 76ea7fe into binarywang:develop Jan 3, 2022
@binarywang binarywang added this to the 4.2.4 milestone Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

4.2.4

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@dany1 @binarywang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.