/// <summary> /// 增加下载记录 /// </summary> /// <param name="pRequest"></param> /// <returns></returns> private string AddVersionDownLoadLog(string pRequest) { var rp = pRequest.DeserializeJSONTo <APIRequest <AppVersionDownloadLogRP> >(); var loggingSessionInfo = Default.GetBSLoggingSession(rp.CustomerID, "1"); if (rp.Parameters.Channel == 0 || string.IsNullOrEmpty(rp.CustomerID + rp.Parameters.Plat + rp.Parameters.Version + rp.Parameters.DownloadURL)) { throw new APIException("缺少请求参数。") { ErrorCode = ERROR_CODES.INVALID_REQUEST_LACK_REQUEST_PARAMETER } } ; var appVersionLogBLL = new APPVersionDownloadVIPLogBLL(loggingSessionInfo); var entity = new APPVersionDownloadVIPLogEntity { Channel = rp.Parameters.Channel, Plat = rp.Parameters.Plat, Version = rp.Parameters.Version, DownloadUrl = rp.Parameters.DownloadURL, CustomerId = rp.CustomerID, VipId = rp.Parameters.VipId }; try { appVersionLogBLL.AddAppVersionDownloadLog(entity); var result = new EmptyResponseData(); var rsp = new SuccessResponse <IAPIResponseData>(result); return(rsp.ToJSON()); } catch (APIException ex) { throw new APIException("添加过程中出错."); } }
/// <summary> /// 添加下载记录 /// </summary> /// <param name="entity"></param> public void AddAppVersionDownloadLog(APPVersionDownloadVIPLogEntity entity) { this._currentDAO.AddVersionDownLoadLog(entity); }
/// <summary> /// 更新 /// </summary> /// <param name="pEntity">实体实例</param> /// <param name="pTran">事务实例,可为null,如果为null,则不使用事务来更新</param> public void Update(APPVersionDownloadVIPLogEntity pEntity, IDbTransaction pTran) { _currentDAO.Update(pEntity, pTran); }
/// <summary> /// 创建一个新实例 /// </summary> /// <param name="pEntity">实体实例</param> public void Create(APPVersionDownloadVIPLogEntity pEntity) { _currentDAO.Create(pEntity); }
/// <summary> /// 分页根据实体条件查询实体 /// </summary> /// <param name="pQueryEntity">以实体形式传入的参数</param> /// <param name="pOrderBys">排序组合</param> /// <returns>符合条件的实体集</returns> public PagedQueryResult <APPVersionDownloadVIPLogEntity> PagedQueryByEntity(APPVersionDownloadVIPLogEntity pQueryEntity, OrderBy[] pOrderBys, int pPageSize, int pCurrentPageIndex) { return(_currentDAO.PagedQueryByEntity(pQueryEntity, pOrderBys, pPageSize, pCurrentPageIndex)); }
/// <summary> /// 根据实体条件查询实体 /// </summary> /// <param name="pQueryEntity">以实体形式传入的参数</param> /// <param name="pOrderBys">排序组合</param> /// <returns>符合条件的实体集</returns> public APPVersionDownloadVIPLogEntity[] QueryByEntity(APPVersionDownloadVIPLogEntity pQueryEntity, OrderBy[] pOrderBys) { return(_currentDAO.QueryByEntity(pQueryEntity, pOrderBys)); }
/// <summary> /// 删除 /// </summary> /// <param name="pEntity"></param> public void Delete(APPVersionDownloadVIPLogEntity pEntity) { _currentDAO.Delete(pEntity); }