where+=$@" and {nameof(RB_Supplier.TenantId)}={dmodel.TenantId}";
where+=$@" and a.{nameof(RB_Supplier.TenantId)}={dmodel.TenantId}";
}
}
if(dmodel.MallBaseId>0)
if(dmodel.MallBaseId>0)
{
{
where+=$@" and {nameof(RB_Supplier.MallBaseId)}={dmodel.MallBaseId}";
where+=$@" and a.{nameof(RB_Supplier.MallBaseId)}={dmodel.MallBaseId}";
}
}
if(!string.IsNullOrWhiteSpace(dmodel.Name))
if(!string.IsNullOrWhiteSpace(dmodel.Name))
{
{
where+=$@" and {nameof(RB_Supplier.Name)} like '%{dmodel.Name}%'";
where+=$@" and a.{nameof(RB_Supplier.Name)} like '%{dmodel.Name}%'";
}
}
stringsql=$@"select * from {TableName} where{where} order by Id desc";
stringsql=$@"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";
where+=$@" and a.{nameof(RB_Supplier.ID)} in({dmodel.SupplierIds})";
where+=$@" and a.{nameof(RB_Supplier.ID)} in({dmodel.SupplierIds})";
}
}
stringsql=$@"select * from {TableName} as A where{where} order by Id desc";
stringsql=$@"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";