コード例 #1
0
        public RecordPage <SubjectInfo> AddApplyList(MarketOptionSearchParm parm, int pageIndex = 1, int pageSize = 10)
        {
            var dic = new Dictionary <string, object>();

            dic.Add("KeyWord", (parm == null || parm.SubjectNoName == "活动名称或活动编号" || string.IsNullOrEmpty(parm.SubjectNoName)) ? "" : parm.SubjectNoName);
            dic.Add("BrandNo", (parm == null || string.IsNullOrEmpty(parm.BrandNo)) ? "" : parm.BrandNo);
            dic.Add("ApplyBeginTime", (parm == null || string.IsNullOrEmpty(parm.ApplyBeginTime)) ? "" : parm.ApplyBeginTime);
            dic.Add("ApplyEndTime", (parm == null || string.IsNullOrEmpty(parm.ApplyEndTime)) ? "" : parm.ApplyEndTime);
            dic.Add("SpreadStatus", (parm == null || string.IsNullOrEmpty(parm.SpreadStatus)) ? "" : parm.SpreadStatus);
            dic.Add("Level", (parm == null || string.IsNullOrEmpty(parm.Level)) ? "" : parm.Level);
            dic.Add("SubjectType", (parm == null || string.IsNullOrEmpty(parm.SubjectType)) ? "" : parm.SubjectType);
            dic.Add("CategoryNo", (parm == null || string.IsNullOrEmpty(parm.CategoryNo)) ? "" : parm.CategoryNo);
            IEnumerable <SubjectInfo> query = DapperUtil.QueryPaging <SubjectInfo>("ComBeziWfs_SWfsSubjectApply_SubjectList", pageIndex, pageSize, "CreateDateTime desc", dic, new {
                KeyWord        = parm.SubjectNoName,
                BrandNo        = parm.BrandNo,
                ApplyBeginTime = parm.ApplyBeginTime,
                ApplyEndTime   = string.IsNullOrWhiteSpace(parm.ApplyEndTime) ? "" : Convert.ToDateTime(parm.ApplyEndTime).AddDays(1).ToString("yyyy-MM-dd"),
                SpreadStatus   = parm.SpreadStatus,
                Level          = parm.Level,
                SubjectType    = parm.SubjectType,
                CategoryNo     = parm.CategoryNo
            });

            Dictionary <string, List <SWfsSubjectChannelSordRef> > dicSordRef = new SWfsSubjectService().GetSordBySubjectNoList(query.Select(x => x.SubjectNo).ToArray());

            foreach (var subject in query)
            {
                subject.ChannelSordList = dicSordRef.Keys.Contains(subject.SubjectNo) ? dicSordRef[subject.SubjectNo] : null;
            }
            return(PageConvertor.Convert(pageIndex, pageSize, query.ToList()));
        }
コード例 #2
0
ファイル: StyleService.cs プロジェクト: windygu/shangpincms
        /// <summary>
        /// 活动图管理列表
        /// </summary>
        /// <param name="keyword">活动图名称</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="pageIndex"当前页></param>
        /// <param name="pageSize">页码</param>
        /// <returns></returns>
        public RecordPage <SWfsStyleActivityPicM> SelectActivityPicList(string keyword, string startTime, string endTime, int pageIndex, int pageSize)
        {
            var dic = new Dictionary <string, object>();

            dic.Add("KeyWord", (keyword == null || keyword == "活动图名称") ? "" : keyword.Trim());
            dic.Add("StartTime", startTime == null ? "" : startTime);
            dic.Add("EndTime", endTime == null ? "" : endTime);
            DynamicParameters param = new DynamicParameters();

            param.Add("ActivityName", keyword, System.Data.DbType.AnsiString, System.Data.ParameterDirection.Input, 100);
            param.Add("StartTime", (!string.IsNullOrWhiteSpace(startTime) ? startTime : "1900-01-01 00:00:00"), System.Data.DbType.DateTime, System.Data.ParameterDirection.Input);
            param.Add("EndTime", (!string.IsNullOrWhiteSpace(endTime) ? endTime : "1900-01-01 00:00:00"), System.Data.DbType.DateTime, System.Data.ParameterDirection.Input);
            IEnumerable <SWfsStyleActivityPicM> query = DapperUtil.QueryPaging <SWfsStyleActivityPicM>("ComBeziWfs_SWfsStyleActivityPic_FindStyleActivityPicList", pageIndex, pageSize, "StartTime desc,CreateDate desc", dic, param);

            return(PageConvertor.Convert(pageIndex, pageSize, query.ToList()));
        }
コード例 #3
0
        /// <summary>
        /// EP改版 20141003 by lijia
        /// </summary>
        /// <param name="typeId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public RecordPage <BrandIndexM> GetBrandIndexDataListNew(int typeId, int pageIndex, int pageSize)
        {
            var dic = new Dictionary <string, object>();

            dic.Add("TypeId", typeId);
            DynamicParameters param = new DynamicParameters();

            param.Add("TypeId", typeId, System.Data.DbType.Int32, System.Data.ParameterDirection.Input);
            List <BrandIndexM>        list  = new List <BrandIndexM>();
            IEnumerable <BrandIndexM> query = DapperUtil.QueryPaging <BrandIndexM>("ComBeziWfs_SWfsBrandIndex_FindBrandIndexDataListNew", pageIndex, pageSize, "SWfsBrandIndex.Sort ASC ,SWfsBrandIndex.DateCreate ASC", dic, param);

            if (query != null && query.Count() > 0)
            {
                list = query.ToList();
            }
            list = (list == null ? new List <BrandIndexM>() : list);
            return(PageConvertor.Convert(pageIndex, pageSize, list));
        }
コード例 #4
0
        /// <summary>
        /// 获取招分期支付成功订单列表
        /// </summary>
        /// <param name="orderNo">尚品订单编号</param>
        /// <param name="payDate">支付成功日期</param>
        /// <param name="endPayDate">结束支付日期</param>
        /// <param name="isCount">是否统计总记录数</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">页码</param>
        /// <param name="readCount">输出总记录数</param>
        /// <returns></returns>
        public IList <WfsBankFQPayM> GetBankFQPayList(string orderNo, string payDate, string endPayDate, bool isCount, int pageIndex, int pageSize, out int readCount)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("OrderNo", string.IsNullOrEmpty(orderNo) ? "" : orderNo);
            dic.Add("PayDate", string.IsNullOrEmpty(payDate) ? "" : payDate);
            dic.Add("EndPayDate", string.IsNullOrEmpty(endPayDate) ? "" : endPayDate);
            dic.Add("TopNum", 0); //0查询所有记录,1统计总记录数
            object obj = new { OrderNo = orderNo, PayDate = payDate, EndPayDate = endPayDate, pageIndex = pageIndex, pageSize = pageSize };
            IList <WfsBankFQPayM> list = DapperUtil.QueryPaging <WfsBankFQPayM>("ComBeziWfs_WfsOrderBankFQPay_SelectOrderBankFQListNew", pageIndex, pageSize, "PayDate DESC", dic, obj).ToList();

            //IList<WfsBankFQPayM> list = DapperUtil.Query<WfsBankFQPayM>("ComBeziWfs_WfsOrderBankFQPay_SelectOrderBankFQListNew", dic, obj).ToList();
            if (!isCount)
            {
                readCount = 0;
            }
            else
            {
                readCount = GetRecordCount(dic, obj, "ComBeziWfs_WfsOrderBankFQPay_SelectOrderBankFQListNew"); //获取总记录数
            }
            return(list);
        }//GetBankFQPayList
コード例 #5
0
        /// <summary>
        /// 品牌首页管理——热门品牌管理EP 20141003 by lijia
        /// </summary>
        /// <param name="showName"></param>
        /// <param name="typeId"></param>
        /// <param name="status"></param>
        /// <param name="brandView"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        public RecordPage <SWfsBrandIndexInfo> GetHotBrandList(string showName, string typeId, string status, string brandView, int pageIndex, int pageSize)
        {
            var dic = new Dictionary <string, object>();

            dic.Add("BrandShowName", showName);
            dic.Add("TypeId", typeId);
            dic.Add("Status", status);
            DynamicParameters param = new DynamicParameters();

            param.Add("BrandView", brandView, System.Data.DbType.Int32, System.Data.ParameterDirection.Input);
            param.Add("BrandShowName", showName, System.Data.DbType.AnsiString, System.Data.ParameterDirection.Input);
            param.Add("TypeId", typeId, System.Data.DbType.AnsiString, System.Data.ParameterDirection.Input);
            param.Add("Status", status, System.Data.DbType.AnsiString, System.Data.ParameterDirection.Input);
            IEnumerable <SWfsBrandIndexInfo> query = DapperUtil.QueryPaging <SWfsBrandIndexInfo>("ComBeziWfs_SpBrand_SWfsBrandIndex_ListOutlet", pageIndex, pageSize, "SWfsBrandIndex.Sort asc,SWfsBrandIndex.DateCreate ASC", dic, param);
            List <SWfsBrandIndexInfo>        list  = new List <SWfsBrandIndexInfo>();

            if (query != null && query.Count() > 0)
            {
                list = query.ToList();
            }
            list = (list == null ? new List <SWfsBrandIndexInfo>() : list);
            return(PageConvertor.Convert(pageIndex, pageSize, list));
        }
コード例 #6
0
        public RecordPage <ProductInfo> GetProductListByTopicNo(IDictionary <string, object> dic, int pageIndex, int pageSize)
        {
            IList <ProductInfo> productList = DapperUtil.QueryPaging <ProductInfo>("ComBeziWfs_SWfsTopicProductRef_SelectTopicProductByTopicNo", pageIndex, pageSize, "SWfsTopicProductRef.OrderFlag asc", dic, new { gCategroyNo = dic["gCategroyNo"].ToString(), brandNo = dic["brandNo"].ToString(), TopicNo = dic["topicId"].ToString(), productNoOrName = dic["productNoOrName"].ToString() }).ToList();

            return(PageConvertor.Convert(pageIndex, pageSize, productList));
        }
コード例 #7
0
        public RecordPage <ProductInfo> GetProductList(IDictionary <string, object> dic, int pageIndex, int pageSize)
        {
            IList <ProductInfo> productList = DapperUtil.QueryPaging <ProductInfo>("ComBeziWfs_WfsProduct_SelectTopicProductList", pageIndex, pageSize, "ProductNo desc", dic, new { gCategroyNo = dic["gCategroyNo"].ToString(), brandNo = dic["brandNo"].ToString(), productNoOrName = dic["productNoOrName"].ToString(), gender = dic["gender"].ToString() }).ToList();

            return(PageConvertor.Convert(pageIndex, pageSize, productList));
        }