using PushPlatform.Common.Util;
using PushService.Act.BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace PushPlatform.Background.Areas.BackGround.Controllers
{
    public class TaskTestController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }

        #region 测试推送
        public JsonResult SoptTask(string Id,string userId)
        {
            JsonResult jr = new JsonResult();
            jr.JsonRequestBehavior = JsonRequestBehavior.AllowGet;
            try
            {
                var result = OutProcessTaskBLL.SendPushOfProCfg(Id, userId);
                jr.Data = new { result = result.Result, msg = result.Msg };
            }
            catch (System.Exception ex)
            {
                LogHelper.Error(ex);
                jr.Data = new { result = 0, msg = "操作失败" };
            }

            return jr;
        }
        #endregion
    }
}