示例#1
0
        public List <PriceEntity> GetList(Pagination pagination, string queryJson, string companyId = "")
        {
            var expression = ExtLinq.True <PriceEntity>();
            var queryParam = queryJson.ToJObject();

            if (!queryParam["keyword"].IsEmpty())
            {
                string keyword = queryParam["keyword"].ToString();
                expression = expression.And(t => t.F_PriceName.Contains(keyword));
            }
            if (!queryParam["type"].IsEmpty())
            {
                string type = queryParam["type"].ToString();
                expression = expression.And(t => t.F_PriceType == type);
            }
            if (!string.IsNullOrEmpty(companyId))
            {
                expression = expression.And(t => t.F_OwnerId == companyId);
            }
            expression = expression.And(t => t.F_DeleteMark == false || t.F_DeleteMark == null);
            return(_service.FindList(expression, pagination));
        }