BaseWeixinWXXMessage

package
v5.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(args *ArgsCreate) (err error)

Create 写入新的数据 系统将自动去重处理,如果重复则拒绝

func Run

func Run()

func SendMessageTemplate

func SendMessageTemplate(args *ArgsSendMessageTemplate) error

SendMessageTemplate 推送模版消息

func SendMessageTemplateByOrderCreate

func SendMessageTemplateByOrderCreate(args *ArgsSendMessageTemplateByOrderCreate) error

SendMessageTemplateByOrderCreate 推送订单创建成功

func SendMessageTemplateByOrderPay

func SendMessageTemplateByOrderPay(args *ArgsSendMessageTemplateByOrderPay) error

SendMessageTemplateByOrderPay 推送订单支付成功

Types

type ArgsCreate

type ArgsCreate struct {
	//组织ID
	OrgID int64
	//用户ID
	UserID int64
	//用户OpenID
	OpenID string
	//表单ID
	FormID string
}

ArgsCreate 写入新的数据参数

type ArgsSendMessageTemplate

type ArgsSendMessageTemplate struct {
	//商户ID
	// 可以留空,则走平台微信小程序主体
	MerchantID int64
	//组织ID
	OrgID int64
	//用户ID
	UserID int64
	//用户OpenID
	UserOpenID string
	//模版ID
	TemplateID string
	//页数
	Page string
	//表单ID
	FromID string
	//推送参数
	Data map[string]interface{}
	//关键词
	EmphasisKeyword string
}

ArgsSendMessageTemplate 推送模版消息参数

type ArgsSendMessageTemplateByOrderCreate

type ArgsSendMessageTemplateByOrderCreate struct {
	//商户ID
	// 可以留空,则走平台微信小程序主体
	MerchantID int64
	//组织ID
	OrgID int64
	//用户ID
	UserID int64
	//用户OpenID
	UserOpenID string
	//订单ID
	OrderID string
	//价格
	Price float64
	//姓名
	Name string
	//电话
	Phone string
	//地址
	Address string
}

ArgsSendMessageTemplateByOrderCreate 推送订单创建成功参数

type ArgsSendMessageTemplateByOrderPay

type ArgsSendMessageTemplateByOrderPay struct {
	//商户ID
	// 可以留空,则走平台微信小程序主体
	MerchantID int64
	//组织ID
	OrgID int64
	//用户ID
	UserID int64
	//用户OpenID
	UserOpenID string
	//订单ID
	OrderID string
	//支付来源
	PayFrom string
	//价格
	Price float64
	//订单备注
	OrderDes string
}

ArgsSendMessageTemplateByOrderPay 推送订单支付成功参数

type FieldsWeixinMessageType

type FieldsWeixinMessageType struct {
	//ID
	ID int64 `db:"id" json:"id"`
	//创建时间
	CreateAt time.Time `db:"create_at" json:"createAt"`
	//过期时间
	ExpireAt time.Time `db:"expire_at" json:"expireAt"`
	//组织ID
	// 如果留空,则表明为平台方
	OrgID int64 `db:"org_id" json:"orgID"`
	//用户ID
	UserID int64 `db:"user_id" json:"userID"`
	//OpenID
	OpenID string `db:"open_id" json:"openID"`
	//FormID
	// 表单ID
	FormID string `db:"from_id" json:"formID"`
}

FieldsWeixinMessageType 微信推送消息的底层支持 提供数据库记录和发送功能

Directories

Path Synopsis
Package template 模版消息
Package template 模版消息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL