Skip to content

[Feature] 新增商家客服模块支持 #3991

Description

@binarywang

功能描述

商家客服模块支持向用户发送客服消息,目前WxJava完全未实现。

官方文档

https://developers.weixin.qq.com/doc/channels/API/kf/

需要实现的接口列表(2个)

接口名称 请求路径
上传多媒体资源 /channels/ec/commkf/cosupload
发送消息 /channels/ec/commkf/sendmsg

实现要点

1. 新建服务接口

public interface WxChannelKfService {
  /**
   * 上传多媒体资源
   * @param type 资源类型: image/video/file
   * @param file 文件内容
   * @return media_id
   */
  String uploadMedia(String type, byte[] file) throws WxErrorException;
  
  /**
   * 发送客服消息
   * @param openId 用户openid
   * @param msgType 消息类型: text/image/video/file/product_share/order_share
   * @param content 消息内容
   */
  void sendMessage(String openId, String msgType, Object content) throws WxErrorException;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions