using Furion;
using Furion.EventBus;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Helper
{
public static class DingTalkGroupHelper
{
///
/// 发送钉钉客服群组消息通知
///
/// 钉钉群配置code
/// 标题
/// 内容
public static async void SendDingTalkGroupMessage(string code, string title, string content)
{
var evtPub = App.GetService();
await evtPub.PublishAsync(new ChannelEventSource("DingTalkGroup:Send", new
{
code,
title,
content
}));
}
///
/// 发送钉钉客服群组消息通知
///
/// 钉钉群配置code
/// 标题
/// 内容
/// @所有人
/// @手机号数组
/// @用户id数组
public static async void SendDingTalkGroupMessage(string code, string title, string content, bool atAll, string[] atMobiles, string[] atUserIds)
{
var evtPub = App.GetService();
await evtPub.PublishAsync(new ChannelEventSource("DingTalkGroup:SendAt", new
{
code,
title,
content,
atAll,
atMobiles,
atUserIds,
}));
}
}
}