Commit 3d3b244f authored by 吴春's avatar 吴春

Update RB_SupplierRepository.cs

parent f3b005da
......@@ -24,7 +24,7 @@ namespace Mall.Repository.User
/// <returns></returns>
public List<RB_Supplier_Extend> GetPageList(int pageIndex, int pageSize, out long rowCount, RB_Supplier_Extend dmodel)
{
string where = " 1=1 AND Status=0 ";
string where = " where 1=1 AND a.Status=0 ";
if (dmodel.TenantId > 0)
{
where += $@" and a.{nameof(RB_Supplier.TenantId)}={dmodel.TenantId}";
......@@ -37,7 +37,7 @@ namespace Mall.Repository.User
{
where += $@" and a.{nameof(RB_Supplier.Name)} like '%{dmodel.Name}%'";
}
string sql = $@"select a.*,b.`Name` as IntroducerName from rb_distributor_info as a LEFT JOIN rb_member_user as b on a.Introducer=b.UserId {where} order by Id desc";
string sql = $@"select a.*,b.`Name` as IntroducerName from rb_distributor_info as a LEFT JOIN rb_member_user as b on a.Introducer=b.UserId {where} order by a.Id desc";
return GetPage<RB_Supplier_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
}
......@@ -48,7 +48,7 @@ namespace Mall.Repository.User
/// <returns></returns>
public List<RB_Supplier_Extend> GetList(RB_Supplier_Extend dmodel)
{
string where = " 1=1 AND Status=0 ";
string where = " where 1=1 AND a.Status=0 ";
if (dmodel.TenantId > 0)
{
where += $@" and a.{nameof(RB_Supplier.TenantId)}={dmodel.TenantId}";
......@@ -65,7 +65,7 @@ namespace Mall.Repository.User
{
where += $@" and a.{nameof(RB_Supplier.ID)} in({dmodel.SupplierIds})";
}
string sql = $@"select a.*,b.`Name` as IntroducerName from {TableName} as a LEFT JOIN rb_distributor_info as b on a.Introducer=b.UserId {where} order by Id desc";
string sql = $@"select a.*,b.`Name` as IntroducerName from {TableName} as a LEFT JOIN rb_distributor_info as b on a.Introducer=b.UserId {where} order by a.Id desc";
return Get<RB_Supplier_Extend>(sql).ToList();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment