using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.User;
using Mall.Model.Extend.User;
using System.Linq;

namespace Mall.Repository.User
{
    /// <summary>
    /// 商户表仓储层
    /// </summary>
    public class RB_TenantRepository : RepositoryBase<RB_Tenant>
    {
        /// <summary>
        /// 根据查询条件获取商户列表
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <returns></returns>
        public List<RB_Tenant_Extend> GetListRepository(RB_Tenant_Extend query)
        {
            StringBuilder builder = new StringBuilder();
            return Get<RB_Tenant_Extend>(builder.ToString()).ToList();
        }

        /// <summary>
        /// 获取商户根也列表
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页显示条数</param>
        /// <param name="rowCount">总条数</param>
        /// <param name="query">查询条件</param>
        /// <returns></returns>
        public List<RB_Tenant_Extend> GetPageListRepository(int pageIndex, int pageSize, out long rowCount, RB_Tenant_Extend query)
        {
            StringBuilder builder = new StringBuilder();
            return GetPage<RB_Tenant_Extend>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
        }
    }
}
