public async Task <PagingResponseMessage <SearchDynamicResponse> > SearchConsumableRecord(Models.UserInfo user, [FromBody] ConsumableRecordRequest request) { Logger.Trace($"用户{user?.UserName ?? ""}({user?.Id ?? ""})查询抽奖记录列表,请求参数为:\r\n" + (request != null ? JsonHelper.ToJson(request) : "")); var response = new PagingResponseMessage <SearchDynamicResponse>(); if (!ModelState.IsValid) { response.Code = ResponseCodeDefines.ArgumentNullError; response.Message = "模型验证失败" + ModelState.GetAllErrors(); Logger.Warn("查询抽奖记录列表,模型验证失败:\r\n{0}", response.Message ?? ""); return(response); } try { response = await _giftManager.SearchConsumableRecordAsync(request, HttpContext.RequestAborted); } catch (Exception e) { response.Code = ResponseCodeDefines.ServiceError; response.Message = e.Message; Logger.Error($"用户{user?.UserName ?? ""}({user?.Id ?? ""})查询抽奖记录列表,报错:{e.Message}\r\n{e.StackTrace}"); } return(response); }