public ActionResult GetPointCommodityList()
        {
            GetPointCommodityListArgs args = RequestArgs <GetPointCommodityListArgs>();

            if (args == null)
            {
                return(RespondResult(false, "参数无效。"));
            }
            //只取上架的商品
            args.ForSale = true;
            GetItemListResult <PointCommodityEntity> result =
                _pointCommodityManager.GetPointCommodityList(DomainContext.Domain.Id, DomainContext.AppId, args);

            return(RespondDataResult(result));
        }
        public ActionResult GetPointCommodityList()
        {
            //domainId,如果是微信端,则微信端的WEB页面要自动完成一个login操作
            //在SESSION中记录用户信息
            GetPointCommodityListArgs args = RequestArgs <GetPointCommodityListArgs>();

            if (args == null)
            {
                return(RespondResult(false, "参数无效。"));
            }

            GetItemListResult <PointCommodityEntity> result =
                _pointCommodityManager.GetPointCommodityList(UserContext.User.Domain, DomainContext.AppId, args);

            return(RespondDataResult(result));
        }
        public GetItemListResult <PointCommodityEntity> GetPointCommodityList(Guid domainId, string appId, GetPointCommodityListArgs args)
        {
            GetItemListResult <PointCommodityEntity> result = new GetItemListResult <PointCommodityEntity>();

            List <AttachedWhereItem> attachedWhere = new List <AttachedWhereItem>();

            attachedWhere.Add(new AttachedWhereItem("Domain", domainId));
            attachedWhere.Add(new AttachedWhereItem("AppId", appId));
            attachedWhere.Add(new AttachedWhereItem("Remove", false));
            if (String.IsNullOrEmpty(args.Name) == false)
            {
                attachedWhere.Add(new AttachedWhereItem("Name", args.Name)
                {
                    Type = AttachedWhereType.Like
                });
            }
            if (args.ForSale.HasValue)
            {
                attachedWhere.Add(new AttachedWhereItem("ForSale", args.ForSale));
            }

            SqlExpressionPagingArgs pagingArgs = new SqlExpressionPagingArgs();

            pagingArgs.Page     = args.Page;
            pagingArgs.PageSize = args.PageSize;

            result.ItemList  = _dataBase.Select <PointCommodityEntity>(attachedWhere, pagingArgs);
            result.TotalPage = pagingArgs.TotalPage;
            result.Page      = pagingArgs.Page;

            if (result.ItemList.Count == 0 && result.Page > 1)
            {
                args.Page--;
                return(GetPointCommodityList(domainId, appId, args));
            }
            else
            {
                return(result);
            }
        }