SELECT A.*,B.CourseName,B.CourseFeature,D.TeacherName,IFNULL(D.TeacherHead,'') AS TeacherHead,E.SName AS SchoolName,R.RoomName
,IFNULL(t.GuestNum,0) AS OrderStudentCount,IFNULL(B.SellPrice,0) AS CourseSellPrice,IFNULL(B.OriginalPrice,0) AS CourseOriginalPrice
,IFNULL(t.GuestNum,0) AS OrderStudentCount,IFNULL(B.SellPrice,0) AS CourseSellPrice,IFNULL(B.OriginalPrice,0) AS CourseOriginalPrice ,B.B2CRatio,B.B2CReNewRatio
,B.CourseSubject,IFNULL(csubject.SubjectName,'') AS CourseSubjectName
FROM rb_class AS A LEFT JOIN rb_course AS B ON A.CouseId=B.CourseId
stringsql=$@"SELECT g.Mobile FROM rb_order_guest g
LEFT JOIN rb_order o on g.OrderId = o.OrderId
WHERE g.`Status` =0 and g.Group_Id ={groupId} and o.OrderState <>3 and o.OrderType =1 and o.CustomerId ={customerId} and g.Mobile in ({("'"+string.Join("','",mobileList)+"'")}) ";