/// <summary> /// 查询 /// </summary> /// <param name="vipSearchInfo"></param> /// <returns></returns> public VipEntity WebGetList(VipSearchEntity vipSearchInfo) { try { VipEntity vipInfo = new VipEntity(); int iCount = _currentDAO.WebGetListCount(vipSearchInfo); IList <VipEntity> vipInfoList = new List <VipEntity>(); DataSet ds = _currentDAO.WebGetList(vipSearchInfo); if (ds != null && ds.Tables[0].Rows.Count > 0) { vipInfoList = DataTableToObject.ConvertToList <VipEntity>(ds.Tables[0]); } vipInfo.ICount = iCount; vipInfo.vipInfoList = vipInfoList; return(vipInfo); } catch (Exception ex) { throw (ex); } }
public IList <TagsEntity> GetList(VipTagsMappingEntity qEntity) { DataSet ds = _currentDAO.GetList(qEntity); return(DataTableToObject.ConvertToList <TagsEntity>(ds.Tables[0])); }
/// <summary> /// 列表获取 /// </summary> public IList <ZCourseEntity> GetCourses(ZCourseEntity entity, int Page, int PageSize) { var zCourseReflectionsBLL = new ZCourseReflectionsBLL(CurrentUserInfo); var zCourseNewsMappingBLL = new ZCourseNewsMappingBLL(CurrentUserInfo); var lNewsBLL = new LNewsBLL(CurrentUserInfo); var objectImagesBLL = new ObjectImagesBLL(CurrentUserInfo); if (PageSize <= 0) { PageSize = 15; } IList <ZCourseEntity> eventsList = new List <ZCourseEntity>(); DataSet ds = new DataSet(); ds = _currentDAO.GetCourses(entity, Page, PageSize); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { eventsList = DataTableToObject.ConvertToList <ZCourseEntity>(ds.Tables[0]); if (eventsList != null) { foreach (var item in eventsList) { item.CourseReflectionsList = zCourseReflectionsBLL.GetList(new ZCourseReflectionsEntity() { CourseId = item.CourseId }, 0, 10000); var mapList = zCourseNewsMappingBLL.QueryByEntity(new ZCourseNewsMappingEntity() { CourseId = item.CourseId }, null); if (mapList != null) { item.NewsList = new List <LNewsEntity>(); foreach (var mapItem in mapList) { var newsObj = lNewsBLL.GetByID(mapItem.NewsId); if (newsObj == null) { continue; } item.NewsList.Add(new LNewsEntity() { NewsId = newsObj.NewsId, NewsTitle = newsObj.NewsTitle, PublishTime = newsObj.PublishTime, displayIndex = newsObj.displayIndex, }); } } item.ImageList = objectImagesBLL.QueryByEntity(new ObjectImagesEntity() { ObjectId = item.CourseId }, null).ToList(); if (item.ImageList.Count > 0) { item.ImageUrl = item.ImageList[0].ImageURL; } } } } return(eventsList); }
/// <summary> /// 活动报名表数据获取 /// </summary> /// <param name="EventID">活动标识</param> /// <returns></returns> public GetResponseParams <QuestionnaireEntity> getEventApplyQues(string EventID) { #region if (EventID == null) { return(new GetResponseParams <QuestionnaireEntity> { Flag = "0", Code = "404", Description = "活动标识为空", }); } #endregion GetResponseParams <QuestionnaireEntity> response = new GetResponseParams <QuestionnaireEntity> { Flag = "1", Code = "200", Description = "成功" }; try { QuestionnaireEntity quesInfo = new QuestionnaireEntity(); #region 业务处理 //1.获取问题数量 quesInfo.QuestionCount = _currentDAO.GetEventApplyQuesCount(EventID); //2.获取问题列表 if (quesInfo.QuestionCount > 0) { DataSet ds = new DataSet(); ds = _currentDAO.GetEventApplyQuesList(EventID); IList <QuesQuestionsEntity> questionList = new List <QuesQuestionsEntity>(); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { questionList = DataTableToObject.ConvertToList <QuesQuestionsEntity>(ds.Tables[0]); if (questionList != null && questionList.Count > 0) { //3.获取问题选项 foreach (QuesQuestionsEntity questionInfo in questionList) { DataSet ds1 = new DataSet(); ds1 = _currentDAO.GetEventApplyOptionList(questionInfo.QuestionID); if (ds1 != null && ds1.Tables.Count > 0 && ds1.Tables[0].Rows.Count > 0) { IList <QuesOptionEntity> optionList = new List <QuesOptionEntity>(); optionList = DataTableToObject.ConvertToList <QuesOptionEntity>(ds1.Tables[0]); questionInfo.QuesOptionEntityList = optionList; } } quesInfo.QuesQuestionEntityList = questionList; } } } #endregion response.Params = quesInfo; return(response); } catch (Exception ex) { response.Flag = "0"; response.Code = "103"; response.Description = "失败:" + ex.ToString(); return(response); } }
/// <summary> /// 根据优惠券类型获取优惠券 /// </summary> /// <param name="couponTypeID"></param> /// <returns></returns> public List <CouponEntity> GetCouponBycouponType(string couponTypeID) { return(DataTableToObject.ConvertToList <CouponEntity>(this._currentDAO.GetCouponBycouponType(couponTypeID).Tables[0]));; }
/// <summary> /// 获取会员卡交易记录 /// </summary> /// <param name="VipCardCode"></param> /// <returns></returns> public List <VipCardTransLogInfo> GetVipCardTransLogList(string VipCardCode) { var dsTrans = this._currentDAO.GetVipCardTransLogList(VipCardCode); return(DataTableToObject.ConvertToList <VipCardTransLogInfo>(dsTrans.Tables[0])); }
public SysRetailRewardRuleEntity[] GetSysRetailRewardRule(SysRetailRewardRuleEntity en) { return(DataTableToObject.ConvertToList <SysRetailRewardRuleEntity>(this._currentDAO.GetSysRetailRewardRule(en).Tables[0]).ToArray()); }
/// <summary> /// 关注或者注册日志 /// </summary> /// <param name="strCTWEventId">主题活动标识</param> /// <param name="strVipId">注册操作的vipid</param> /// <param name="strFocusVipId">关注操作的vipid</param> public void CTWRegOrFocusLog(string strCTWEventId, string strRegVipId, string strFocusVipId, LoggingSessionInfo loggingSession, string strType) { string strVipId = string.Empty; if (strType == "Reg") { strVipId = strRegVipId; } if (strType == "Focus") { strVipId = strFocusVipId; } BaseService.WriteLogWeixin(" 创意仓库日志:" + strCTWEventId + "+" + strVipId + "+" + strType); try { int intResult = this._currentDAO.IsExistsLog(strCTWEventId, strVipId, strType, loggingSession.ClientID); if (intResult == 0) { T_LEventsRegVipLogEntity entityRegVipLog = new T_LEventsRegVipLogEntity(); entityRegVipLog.BusTypeCode = "CTW"; entityRegVipLog.ObjectId = strCTWEventId; entityRegVipLog.RegVipId = strRegVipId; entityRegVipLog.FocusVipId = strFocusVipId; entityRegVipLog.CustomerId = loggingSession.ClientID; this._currentDAO.Create(entityRegVipLog); //触点奖励 ContactEventBLL bllContactEvent = new ContactEventBLL(loggingSession); var entityContact = bllContactEvent.QueryByEntity(new ContactEventEntity() { EventId = strCTWEventId, IsDelete = 0, IsCTW = 1, ContactTypeCode = strType }, null).SingleOrDefault(); if (entityContact != null) { LPrizesBLL bllPrize = new LPrizesBLL(loggingSession); var prize = DataTableToObject.ConvertToList <LPrizesEntity>(bllPrize.GetCouponTypeIDByEventId(entityContact.ContactEventId.ToString()).Tables[0]).FirstOrDefault(); if (prize != null) { CouponBLL bllCoupon = new CouponBLL(loggingSession); if (prize.PrizeTypeId == "Coupon") { bllCoupon.CouponBindVip(strVipId, prize.CouponTypeID, entityContact.ContactEventId.ToString(), strType); } if (prize.PrizeTypeId == "Point") { #region 调用积分统一接口 var salesReturnBLL = new T_SalesReturnBLL(loggingSession); VipIntegralBLL bllVipIntegral = new VipIntegralBLL(loggingSession); var vipBLL = new VipBLL(loggingSession); var vipInfo = vipBLL.GetByID(strVipId); string strIntegralSourceID = string.Empty; switch (entityContact.ContactTypeCode.ToString().TrimEnd()) { case "Reg": strIntegralSourceID = "2"; break; case "Focus": strIntegralSourceID = "3"; break; case "Share": strIntegralSourceID = "28"; break; default: strIntegralSourceID = "22"; break; } var IntegralDetail = new VipIntegralDetailEntity() { Integral = prize.Point, IntegralSourceID = strIntegralSourceID, ObjectId = entityContact.ContactEventId.ToString() }; //变动前积分 string OldIntegral = (vipInfo.Integration ?? 0).ToString(); //变动积分 string ChangeIntegral = (IntegralDetail.Integral ?? 0).ToString(); var vipIntegralDetailId = bllVipIntegral.AddIntegral(ref vipInfo, null, IntegralDetail, null, loggingSession); //发送微信积分变动通知模板消息 if (!string.IsNullOrWhiteSpace(vipIntegralDetailId)) { var CommonBLL = new CommonBLL(); CommonBLL.PointsChangeMessage(OldIntegral, vipInfo, ChangeIntegral, vipInfo.WeiXinUserId, loggingSession); } #endregion } //LPrizeWinnerEntity entityPrizeWinner = new LPrizeWinnerEntity() //{ // PrizeWinnerID = Guid.NewGuid().ToString(), // VipID = strVipId, // PrizeID = prize.PrizesID, // PrizeName = prize.PrizeName, // PrizePoolID = entityPrizePool == null ? "" : entityPrizePool.PrizePoolsID, // CreateBy = this.CurrentUserInfo.UserID, // CreateTime = DateTime.Now, // IsDelete = 0 //}; //bllPrizeWinner.Create(entityPrizeWinner); } } } } catch (Exception ex) { BaseService.WriteLogWeixin(" 创意仓库日志:" + ex.ToString() + "+"); } }
public ReservationServiceScheduleEntity[] QueryAllField(IWhereCondition[] pWhereConditions, OrderBy[] pOrderBys) { DataSet ds = _currentDAO.QueryAllField(pWhereConditions, pOrderBys); return(DataTableToObject.ConvertToList <ReservationServiceScheduleEntity>(ds.Tables[0]).ToArray()); }