using PushInfo.Act.Models.QueryResults;
using PushPlatform.Common.Model;
using PushService.Act.Model;
using PushService.Act.Model.QueryResults;
using PushService.Act.Model.Request;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace PushPfService
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IService1”。
    [ServiceContract]
    public interface IPushPfService
    {
        #region 获取程序员配置的模板列表
        /// <summary>
        /// 获取程序员配置的模板列表
        /// </summary>
        /// <param name="likeName">模块描述模糊名</param>
        /// <returns>模板列表</returns>
        [OperationContract]
        ResultEntity<ListModel<SysPushSimple>> QuerySysPushSelect(string likeName);
        #endregion

        #region 获取某个模板的详细信息
        /// <summary>
        /// 获取某个模板的详细信息
        /// </summary>
        /// <param name="Id">主键Id</param>
        /// <returns>某个模板配置详情</returns>
        [OperationContract]
        ResultEntity<PushConfigResult> GetSysPushModel(string Id);
        #endregion

        #region 获取下拉控件的数据
        [OperationContract]
        ResultEntity<List<SelectItemDetail>> QuerySelectItem();
        #endregion

        #region 获取当前用户配置推送列表
        /// <summary>
        /// 获取当前用户配置推送列表
        /// </summary>
        /// <param name="projectId">子项目Id</param>
        /// <param name="execStatus">推送状态</param>
        /// <param name="likeName">推送描述模糊查询</param>
        /// <param name="pageIndex">第几页</param>
        /// <param name="pageSize">每页大小</param>
        /// <returns>查询返回的推送列表</returns>
        [OperationContract]
        ResultEntity<ListModel<ProjectCfgPush>> QueryProCfgPushList(string projectId, int? execStatus, string likeName, string likeBody, int pageIndex, int pageSize);
        #endregion

        #region 获取当前用户某个配置详细信息
        /// <summary>
        /// 获取当前用户某个配置详细信息
        /// </summary>
        /// <param name="Id">主键Id</param>
        /// <returns></returns>
        [OperationContract]
        ResultEntity<PushConfigResult> GetProCfgPushMo(string Id);
        #endregion

        #region 保存当前用户某个配置详细信息提交
        ResultEntity<string> proCfgSaveConfig(PushConfigResult pushConfig, bool isNew);
        #endregion

        #region 获取推送的日志
        /// <summary>
        /// 获取推送的日志
        /// </summary>
        /// <param name="userId">推送对象的Id</param>
        /// <param name="pushStyle">推送类型APP = 1,短信 = 2,微信 = 3,socket = 4,站内推送 = 5</param>
        /// <param name="pageIndex">第几页</param>
        /// <param name="pageSize">分页大小</param>
        /// <returns></returns>
        [OperationContract]
        ResultEntity<ListModel<PushMsg>> QueryPushMsgList(string userId, List<int> pushStyle, int? haveRead,int pageIndex = 1, int pageSize = 10);
        #endregion

        #region 系统主动调用发送任务,数据来源配置表查询
        /// <summary>
        /// 系统主动调用发送任务,数据来源配置表查询
        /// </summary>
        /// <param name="proCfgId">配置推送表的Id</param>
        /// <param name="userId">推送用户Id</param>
        /// <returns></returns>
        [OperationContract]
        ResultEntity<string> SendPushOfProCfg(string proCfgId, string userId);
        #endregion

        #region 系统主动调用发送任务,数据来源外部
        /// <summary>
        /// 系统主动调用发送任务,数据来源外部
        /// </summary>
        /// <param name="valModel">ProCfg_Id必须传输</param>
        /// <returns></returns>
        [OperationContract]
        ResultEntity<string> SendPushOfExternal(PushValueModel valModel);
        #endregion

    }
}
