Package com.bytedesk.wechat.mp
Class WeChatMpMessageService
java.lang.Object
com.bytedesk.wechat.mp.WeChatMpMessageService
微信公众号
客服消息:https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Service_Center_messages.html#7
- Author:
- kefux.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMediaUrl
(String wxappid, String mediaid) getShortUrl
(String wxappid, String longUrl) getWechatMiniQrcodeUnlimited
(String wxappid, String id) 微信小程序码 wxacode.getUnlimited 获取小程序码,适用于需要的码数量极多的业务场景。static int
saveToImgByInputStream
(InputStream inputStreams, String imgPath, String imgName) 将二进制转换成文件保存sendImageMessageAutoReply
(String wxappid, String openid, String imageUrl) type: 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb) media: form-data中媒体文件标识,有filename、filelength、content-type等信息 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.htmlsendVideoMessageAutoReply
(String wxappid, String openid, String videoUrl, String title, String description) sendVoiceMessageAutoReply
(String wxappid, String openid, String voiceUrl)
-
Field Details
-
restService
-
-
Constructor Details
-
WeChatMpMessageService
public WeChatMpMessageService()
-
-
Method Details
-
sendImageMessageAutoReply
type: 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb) media: form-data中媒体文件标识,有filename、filelength、content-type等信息 https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html -
sendVoiceMessageAutoReply
-
sendVideoMessageAutoReply
-
getMediaUrl
-
getWechatMiniQrcodeUnlimited
微信小程序码 wxacode.getUnlimited 获取小程序码,适用于需要的码数量极多的业务场景。通过该接口生成的小程序码,永久有效,数量暂无限制 https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html -
saveToImgByInputStream
将二进制转换成文件保存- Parameters:
inputStreams
- 二进制流imgPath
- 图片的保存路径imgName
- 图片的名称- Returns:
- 1:保存正常 0:保存失败
-
getShortUrl
-