LadderHookInfoResponse BuildHookInfoResponse(LadderHookEntity entity, bool isHook) { var response = ResponseHelper.CreateSuccess <LadderHookInfoResponse>(); response.Data = new LadderHookInfoEntity(); response.Data.IsHook = isHook; response.Data.CurTimes = entity.CurTimes; response.Data.CurWiningTimes = entity.CurWiningTimes; response.Data.MaxScore = entity.MaxScore; response.Data.MaxTimes = entity.MaxTimes; response.Data.MinScore = entity.MinScore; response.Data.LadderHookList = new List <LadderHook>(); if (_hookListDic.ContainsKey(entity.ManagerId)) { response.Data.LadderHookList = _hookListDic[entity.ManagerId]; } var curTime = DateTime.Now; response.Data.NextMatchWaitSeconds = isHook ? ShareUtil.CalWaitTime(entity.NextMatchTime, curTime) : 0; response.Data.ExpiredTick = ShareUtil.GetTimeTick(entity.Expired); return(response); }