package cn.iocoder.yudao.module.wxcp.service.push;
|
|
import cn.iocoder.yudao.module.wxcp.controller.admin.vo.WxCpPushResultVO;
|
|
/**
|
* 企业微信消息推送 Service 接口
|
*
|
* 抽出来供活动、通知等业务复用,避免各处重复拼装接收者与错误处理
|
*
|
* @author 超级管理员
|
*/
|
public interface WxCpMessagePushService {
|
|
/**
|
* 推送文本卡片消息
|
*
|
* @param title 卡片标题
|
* @param description 卡片正文
|
* @param url 点击按钮跳转地址,textcard 类型必填
|
* @param btnTxt 按钮文案
|
* @param scope 推送范围,见 {@link cn.iocoder.yudao.module.wxcp.enums.activity.WxCpPushScopeEnum}
|
* @param target 推送目标;范围是全员时可传空
|
* @return 推送结果(不抛异常,失败信息通过返回值给出)
|
*/
|
WxCpPushResultVO pushCard(String title, String description, String url,
|
String btnTxt, Integer scope, String target);
|
|
/**
|
* 推送纯文本消息
|
*
|
* @param content 文本内容
|
* @param scope 推送范围
|
* @param target 推送目标
|
* @return 推送结果
|
*/
|
WxCpPushResultVO pushText(String content, Integer scope, String target);
|
|
}
|