using Furion.DynamicApiController;
using Microsoft.AspNetCore.Mvc;
using Nirvana.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Waste.Application
{
    /// <summary>
    /// 测试专用
    /// </summary>
    public class TestAppService : IDynamicApiController
    {
        private readonly ILoggerService _loggerService;
        public TestAppService(ILoggerService loggerService)
        {
            _loggerService = loggerService;
        }
        /// <summary>
        /// 接收测试
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpPost]
        [NonUnify]
        public string Subscribe(BusinessApiS2CDto data)
        {
            var msg = $"平台推送的消息内容:{data.ToJson()}";
            _loggerService.AddLogger(msg, 1);
            return "success";
        }
    }
}
