where+=$@" AND {nameof(RB_Order_Course.Group_Id)} ={demodel.Group_Id}";
where+=$@" AND A.{nameof(RB_Order_Course.Group_Id)} ={demodel.Group_Id}";
}
if(demodel.OrderId>0)
{
where+=$@" AND {nameof(RB_Order_Course.OrderId)} ={demodel.OrderId}";
where+=$@" AND A.{nameof(RB_Order_Course.OrderId)} ={demodel.OrderId}";
}
if(demodel.ClassId>0)
{
where+=$@" AND {nameof(RB_Order_Course.ClassId)} ={demodel.ClassId}";
where+=$@" AND A.{nameof(RB_Order_Course.ClassId)} ={demodel.ClassId}";
}
if(!string.IsNullOrEmpty(demodel.QOrderIds))
{
where+=$@" AND {nameof(RB_Order_Course.OrderId)} in({demodel.QOrderIds})";
where+=$@" AND A.{nameof(RB_Order_Course.OrderId)} in({demodel.QOrderIds})";
}
stringsql=$@" SELECT * FROM RB_Order_Course WHERE {where}";
stringsql=$@" SELECT A.*,IFNULL(B.CourseName,'') AS CourseName FROM RB_Order_Course AS A LEFT JOIN rb_course AS B ON A.CourseId=B.CourseId WHERE {where}";