Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
U
utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
library
utils
Commits
65b733e7
Verified
Commit
65b733e7
authored
Jan 23, 2019
by
Cui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add touser for subscribe struct
parent
8054a7ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
structs.go
sender/structs.go
+2
-0
No files found.
sender/structs.go
View file @
65b733e7
...
@@ -300,6 +300,7 @@ func (mcm *MiniprogrampageCustomerMessage) ToFieldsCustomerMessage() (fields log
...
@@ -300,6 +300,7 @@ func (mcm *MiniprogrampageCustomerMessage) ToFieldsCustomerMessage() (fields log
// 订阅消息
// 订阅消息
type
SubscribeMessage
struct
{
type
SubscribeMessage
struct
{
Touser
string
`json:"touser" bson:"touser"`
// 接收者openid
Appid
string
`json:"appid" bson:"appid"`
// 所需跳转到的小程序appid(该小程序appid必须与发模板消息的公众号是绑定关联关系,并且小程序要求是已发布的)
Appid
string
`json:"appid" bson:"appid"`
// 所需跳转到的小程序appid(该小程序appid必须与发模板消息的公众号是绑定关联关系,并且小程序要求是已发布的)
TemplateId
string
`json:"template_id" bson:"template_id"`
// 订阅消息模板ID
TemplateId
string
`json:"template_id" bson:"template_id"`
// 订阅消息模板ID
Url
string
`json:"url" bson:"url"`
// 点击消息跳转的链接,需要有ICP备案
Url
string
`json:"url" bson:"url"`
// 点击消息跳转的链接,需要有ICP备案
...
@@ -317,6 +318,7 @@ type SubscribeMessage struct {
...
@@ -317,6 +318,7 @@ type SubscribeMessage struct {
func
(
subM
*
SubscribeMessage
)
ToFields
()
(
fields
logrus
.
Fields
)
{
func
(
subM
*
SubscribeMessage
)
ToFields
()
(
fields
logrus
.
Fields
)
{
fields
=
make
(
logrus
.
Fields
)
fields
=
make
(
logrus
.
Fields
)
fields
[
"touser"
]
=
subM
.
Touser
fields
[
"appid"
]
=
subM
.
Appid
fields
[
"appid"
]
=
subM
.
Appid
fields
[
"template_id"
]
=
subM
.
TemplateId
fields
[
"template_id"
]
=
subM
.
TemplateId
fields
[
"url"
]
=
subM
.
Url
fields
[
"url"
]
=
subM
.
Url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment