Exemple #1
0
        public PagingData <MerchantModel> QueryMyMerchants(long userid, int page)
        {
            var apply     = this.WeChat.GetApplyProtocol();
            var condition = PagingCondition.GenerateByPageAndSize(page, Constants.DefaultPageSize);

            return(this.Query(condition, (builder) =>
            {
                builder.Add(Expression.Eq("EnjoyUser.Id", userid));
            },
                              record => Convert(record)));
        }
Exemple #2
0
        public List <ApiModel::Banner> QueryMerchants(ApiModel::PagingX paging)
        {
            var condition = PagingCondition.GenerateByPageAndSize(paging.Page, paging.PageSize);

            return(this._merchantService.QueryMerchants(new WebQueryFilter()
            {
                Columns = new List <QueryColumnFilter>()
                {
                    ////TODO 正式版本中需要取消下面这段代码的注释
                    //new QueryColumnFilter(){
                    //    Name ="Status",
                    //    Searchable = true,
                    //     DbType = System.Data.DbType.String,
                    //    Search = new SearchColumnFilter(){
                    //         Value = AuditStatus.APPROVED
                    //    },
                    //    Orderable = true,
                    //    Data = "Status"
                    //}
                },
                Order = new List <QueryOrderFilter>()
                {
                    new QueryOrderFilter()
                    {
                        ColumnName = "CreateTime",
                        Dir = Direction.Asc
                    }
                }
            }, condition)
                   .Items
                   .Select((ctx) =>
            {
                return new ApiModel::Banner()
                {
                    LinkName = ctx.BrandName,
                    LinkTo = string.Empty,
                    LogoUrl = ctx.LogoUrl,
                    LinkType = 9
                };
            }).ToList());
        }