builder.AppendFormat(@" SELECT A.*,b.TeacherName,b.TeacherHead as TeacherIcon FROM RB_Class_FeedBack AS A LEFT JOIN rb_teacher as b on a.TeacherId=b.TId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.OrderGuestId
LEFT JOIN rb_student as s on s.StuId = sog.Student_Id where 1=1 and a.`Status`=0 and sog.`Status`=0 and s.`Status`=0");
builder.AppendFormat(@"
SELECT A.*,b.TeacherName,b.TeacherHead as TeacherIcon,plan.ClassDate,time.StartTime,time.EndTime,IFNULL(course.CourseName,'') AS CourseName
FROM RB_Class_FeedBack AS A LEFT JOIN rb_teacher as b on a.TeacherId=b.TId
LEFT JOIN rb_student_orderguest as sog on sog.GuestId=a.OrderGuestId
LEFT JOIN rb_student as s on s.StuId = sog.Student_Id
LEFT JOIN rb_class_plan AS plan ON A.ClassPlanId=plan.ClassPlanId
LEFT JOIN rb_class_time AS time ON A.ClassTimeId=time.ClassTimeId
LEFT JOIN(
SELECT guest.Id,course.CourseName
FROM rb_order_guest AS guest INNER JOIN rb_order AS orderTab ON guest.OrderId=orderTab.OrderId
LEFT JOIN rb_course AS course ON orderTab.CourseId=course.CourseId
) AS course ON A.OrderGuestId=course.Id
WHERE 1=1 AND a.`Status`=0 AND sog.`Status`=0 AND s.`Status`=0
");
if(query!=null)
{
if(query.Group_Id>0)
...
...
@@ -104,7 +115,8 @@ LEFT JOIN rb_student as s on s.StuId = sog.Student_Id where 1=1 and a.`Status`=
}
builder.AppendFormat(" ORDER BY a.CreateTime desc ");