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

namespace Waste.Application.PostInfo
{
    /// <summary>
    /// 对接平台接口测试
    /// </summary>
   public class PostInfoAppService: IDynamicApiController
    {
        private readonly ISuZhouService _suZhouService;
        public PostInfoAppService(ISuZhouService suZhouService)
        {
            _suZhouService = suZhouService;
        }
        /// <summary>
        /// Hello接口GET测试
        /// </summary>
        /// <param name="greet"></param>
        /// <returns></returns>
        public async Task<ResultInfo> GetHelloAsync(string greet="hello")
        {
            return await _suZhouService.GetHelloAsync(greet);
        }

        /// <summary>
        /// Hello接口POST测试
        /// </summary>
        /// <param name="greet"></param>
        /// <returns></returns>
        public async Task<ResultInfo> PostHelloAsync(string greet = "hello")
        {
            return await _suZhouService.PostHelloAsync(greet);
        }
        /// <summary>
        /// 分页查询当前账号下存在的地产区域数据
        /// </summary>
        /// <param name="page"></param>
        /// <param name="size"></param>
        /// <param name="search"></param>
        /// <returns></returns>
        public async Task<ResultInfo> GetEstatesAsync(int page = 1, int size = 10, string search = "")
        {
            return await _suZhouService.GetEstatesAsync(page, size, search);
        }
        /// <summary>
        /// 添加地产区域信息
        /// </summary>
        /// <param name="estatesC2SDto"></param>
        /// <returns></returns>
        public async Task<ResultInfo> PostEstatesAsync(EstatesC2SDto estatesC2SDto)
        {
            return await _suZhouService.PostEstatesAsync(estatesC2SDto);
        }
        /// <summary>
        /// 查询地产区域信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<ResultInfo> GetEstatesByIdAsync(string id)
        {
            return await _suZhouService.GetEstatesByIdAsync(id);
        }
        /// <summary>
        /// 向服务端推送测试用垃圾采集数据
        /// </summary>
        /// <param name="garbageC2SDto"></param>
        /// <returns></returns>
        public async Task<ResultInfo> PostGarbagesAsync(GarbageC2SDto garbageC2SDto)
        {
            return await _suZhouService.PostGarbagesAsync(garbageC2SDto);
        }
    }
}
