using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using JCSoft.WX.Framework.Api; using Microsoft.AspNetCore.Mvc; using JCSoft.WX.Framework.Models.ApiRequests; using JCSoft.WX.Framework.Models.ApiResponses; using ZcPeng.weixin.PublicAccount; using Microsoft.Extensions.Caching.Memory; namespace SupplierWeb.Controllers { [Route("api/SendmassMessage")] public class MassMessageController : BaseController { public MassMessageController(IMemoryCache cache, IApiClient client) : base(cache, client) { } public async Task Get() { ErrorMessage errorMessage = null; long message = -1; message = await MassMessage.Send("gh_ab8f63a476a7", true, "group", MassMessageTypeEnum.text, "今晚打老虎", errorMessage); return Json(message); } } }