34 lines
895 B
C#
Raw Normal View History

2025-04-24 18:31:27 +08:00
using MyCode.Project.Domain.Config;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.WebPost;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyCode.Project.OutSideService.Implementation
{
public class DingDingService:IDingDingService
{
public DingDingService()
{
}
#region SendMsg()
public void SendMsg(string content)
{
var url = SystemConfig.DingDingApiUrl;
WebUtils webUtils = new WebUtils();
var jsonObject = new { msgtype = "text", text = new { content = SystemConfig.DingDingTxt+ content } };
var jsonStr = JsonHelper.ToJson(jsonObject);
var result = webUtils.DoPostJson(url, jsonStr);
}
#endregion
}
}