using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using Jayrock.Json;
using JLHHJSvr.BLL;
using JLHHJSvr.Com;
using JLHHJSvr.DBA.DBModle;
using LJLib.DAL.SQL;
using LJLib.Net.SPI.Server;
using LJLib.SQLEX;
using LJLib.Tools.Encry;
using Newtonsoft.Json;
using static NPOI.HSSF.Util.HSSFColor;

namespace JLHHJSvr.Excutor
{
    internal sealed class PingTokenExcutor : ExcutorBase<PingTokenRequest, PingTokenResponse>
    {
        protected override void ExcuteInternal(PingTokenRequest request, object state, PingTokenResponse rslt)
        {
            var tokendata = BllHelper.GetToken(request.token);
            if (tokendata == null)
            {
                rslt.ErrMsg = "会话已经中断，请重新登录";
                return;
            }

            rslt.data = JsonConvert.SerializeObject(tokendata);
        }
    }
}
