builder.AppendFormat(@" SELECT a.*,c.ClassName,b.ClassRoomId,t.TeacherName from rb_class_time as a LEFT JOIN rb_class_plan as b on a.ClassPlanId=b.ClassPlanId
builder.AppendFormat(@" SELECT a.*,if(b.PlanType=2,'预约课',c.ClassName) as ClassName,b.ClassRoomId,t.TeacherName from rb_class_time as a LEFT JOIN rb_class_plan as b on a.ClassPlanId=b.ClassPlanId
LEFT JOIN rb_class as c on a.ClassId=c.ClassId
LEFT JOIN rb_teacher as t on b.TeacherId=t.TId
where b.`Status`=0 and DATE_FORMAT(b.ClassDate,'%y/%m/%d')=DATE_FORMAT(NOW(),'%y/%m/%d') and t.`Status`=0 and c.`Status`=0 and c.ClassStatus in(1,2) ");
where b.`Status`=0 and DATE_FORMAT(b.ClassDate,'%y/%m/%d')=DATE_FORMAT(NOW(),'%y/%m/%d') and t.`Status`=0 and case when b.PlanType =2 then 1=1 else c.`Status`=0 and c.ClassStatus in(1,2) end ");