public async Task <ResponseMessage <List <GiftInfo> > > GetGift(Models.UserInfo user, [FromRoute] string periodId) { Logger.Trace($"用户{user?.UserName ?? ""}({user?.Id ?? ""})赛季奖品管理-列表,请求参数为:periodId{periodId}"); var response = new ResponseMessage <List <GiftInfo> >(); if (string.IsNullOrWhiteSpace(periodId)) { response.Code = ResponseCodeDefines.ArgumentNullError; response.Message = "periodId不能为空"; return(response); } try { response = await _giftManager.GetGiftAsync(user, periodId, 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); }