public RestfulResult Detail(GetPromotionInfoRequest request, [FetchRestfulAuthUser(IsCanMissing = true, KeyName = Define.Token)] UserModel currentAuthUser) { request.CurrentAuthUser = currentAuthUser; return(new RestfulResult { Data = this._promotionDataService.GetPromotionInfo(request) }); }
/// <summary> /// 获取促销详情信息 /// </summary> /// <param name="request"></param> /// <returns></returns> public ExecuteResult <PromotionInfoResponse> GetPromotionInfo(GetPromotionInfoRequest request) { var entity = _promotionRepository.GetItem(request.Promotionid); var response = MappingManager.PromotionResponseMapping(entity, request.CoordinateInfo); if (request.CurrentAuthUser != null && response != null) { //是否收藏 response = IsR(response, request.CurrentAuthUser, response.Id); } var result = new ExecuteResult <PromotionInfoResponse>(response); return(result); }