/// <summary> /// 获得前几行数据 /// </summary> public IList <Wuyiju.Model.DepositRecharge> GetList(Wuyiju.Model.DepositRecharge.Query query, int?limit = null) { using (var db = new DataContext()) { var _dao = this.GetDao(db); return(_dao.GetList(query, limit)); } }
/// <summary> /// 获得数据列表 /// </summary> public IList <Wuyiju.Model.DepositRecharge> GetList(Wuyiju.Model.DepositRecharge.Query filter) { StringBuilder sql = new StringBuilder(@"select * from ec_deposit_recharge where 1 = 1 "); DynamicParameters param = new DynamicParameters(); sql.AndEquals("status"); sql.Append(" order by add_time desc "); if (filter != null) { param.AddDynamicParams(filter); } return(db.GetList <Wuyiju.Model.DepositRecharge>(sql, param)); }
/// <summary> /// 获得前几行数据 /// </summary> public IList <Wuyiju.Model.DepositRecharge> GetList(Wuyiju.Model.DepositRecharge.Query filter, int?limit = null) { StringBuilder sql = new StringBuilder(@"select * from ec_deposit_recharge where 1 = 1 "); if (limit != null) { sql.Append(" limit @rows "); } DynamicParameters param = new DynamicParameters(); if (filter != null) { param.AddDynamicParams(filter); } if (limit != null) { param.Add("rows", limit); } return(db.GetList <Wuyiju.Model.DepositRecharge>(sql, param)); }