using Nirvana.Common.ApiBase;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using YBDevice.Entity;
using YBDevice.NApi.Application.UserInfo;

namespace YBDevice.NApi
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public interface IUserService
    {
        /// <summary>
        /// 检查用户是否存在
        /// </summary>
        /// <param name="userid"></param>
        /// <returns></returns>
        Task<bool> IsExistUserAsync(int userid);
        /// <summary>
        /// 提交意见
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitAdviceAsync(YB_Advice model);

        /// <summary>
        /// 获取用户基本信息
        /// </summary>
        /// <param name="familyid">家庭成员ID</param>
        /// <param name="devtype">设备类型</param>
        /// <returns></returns>
        Task<ResultInfo> GetUserInfoAsync(int familyid = 0, int devtype = 0);
        /// <summary>
        /// 解密手机号
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> DecryptPhoneAsync(WxOpenDecryptSubmitModel model);
        /// <summary>
        /// 获取用户测量数据
        /// </summary>
        /// <returns></returns>
        Task<ResultInfo> GetMeasureInfoAsync(UserMeasureInfoModel model);
        /// <summary>
        /// 获取八电极测量数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<ResultInfo> GetBodyMeasureInfoAsync(UserBodyMeasureInfoModel model);

        /// <summary>
        /// 解密微信运动
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="encryptedData"></param>
        /// <param name="iv"></param>
        /// <returns></returns>
        Task<WXRunListModel> DecodeWxRunBySessionIdAsync(string sessionId, string encryptedData, string iv);

        /// <summary>
        /// 获取趋势信息
        /// </summary>
        /// <param name="bodyQueryTrandDto"></param>
        /// <returns></returns>
        Task<ResultInfo> GetTrendListAsync(BodyQueryTrandDto bodyQueryTrandDto);
        /// <summary>
        /// 获取八电极趋势信息
        /// </summary>
        /// <param name="bodyQueryTrandDto"></param>
        /// <returns></returns>
        Task<ResultInfo> GetBodyTrendListAsync(BodyQueryTrandDto bodyQueryTrandDto);

        /// <summary>
        /// 设备激活
        /// </summary>
        /// <returns></returns>
        Task<ResultInfo> ActiveAsync(string sn, string code);
        /// <summary>
        /// 获取用户使用过的设备类型列表
        /// </summary>
        /// <returns></returns>
        Task<ResultInfo> GetDevTypeListAsync();
        /// <summary>
        /// 添加设备类型
        /// </summary>
        /// <param name="devtype"></param>
        /// <returns></returns>
        Task<ResultInfo> AddDevTypeAsync(int devtype);

        /// <summary>
        /// 退出登录
        /// </summary>
        /// <param name="sessionId"></param>
        /// <returns></returns>
        Task<ResultInfo> OutLogin(string sessionId);
        /// <summary>
        /// 修改初始体重
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<ResultInfo> SubmitFirstWeight(UserFirstWeightC2SDto data);
    }
}
