Commit ecde7882 authored by 黄奎's avatar 黄奎

页面修改

parent a73f2d4b
......@@ -71,6 +71,16 @@ namespace Edu.Model.ViewModel.Reserve
/// </summary>
public string StuTel { get; set; }
/// <summary>
/// QQ号码
/// </summary>
public string QQ { get; set; }
/// <summary>
/// 微信号
/// </summary>
public string WeChatNo { get; set; }
/// <summary>
/// 教师名称
/// </summary>
......
......@@ -29,14 +29,13 @@ namespace Edu.Repository.Reserve
StringBuilder builder = new StringBuilder();
var parameters = new DynamicParameters();
builder.Append(@"
SELECT A.*,IFNULL(B.`Name`,'') AS VisitorName,C.ClassDate,C.ClassTime,C.EndTime,C.ClassContent,IFNULL(D.TeacherName,'') AS TeacherName
,IFNULL(E.RoomName,'') AS RoomName,F.Id AS AccountId,IFNULL(G.LessonName,'') AS LessonName
FROM RB_Visitor_Reserve AS A LEFT JOIN rb_visitor AS B ON A.Visitor_Id=B.Id
SELECT A.*,IFNULL(B.StuName,'') AS VisitorName,C.ClassDate,C.ClassTime,C.EndTime,C.ClassContent,IFNULL(D.TeacherName,'') AS TeacherName,IFNULL(E.RoomName,'') AS RoomName
,IFNULL(B.StuTel,'') AS StuTel,IFNULL(F.LessonName,'') AS LessonName,IFNULL(B.QQ,'') AS QQ,IFNULL(B.WeChatNo,'') AS WeChatNo
FROM RB_Visitor_Reserve AS A LEFT JOIN rb_student AS B ON A.Visitor_Id=B.StuId
LEFT JOIN rb_reserve_class AS C ON A.ReserveClassId=C.ReserveClassId
LEFT JOIN rb_teacher AS D ON C.TeacherId=D.TId
LEFT JOIN rb_account AS F On C.TeacherId=F.AccountId AND F.AccountType=2
LEFT JOIN rb_class_room AS E ON C.ClassRoomId=E.RoomId
LEFT JOIN rb_triallesson AS G ON C.TrialLessonId=G.Id
LEFT JOIN rb_triallesson AS F ON C.TrialLessonId=F.Id
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Visitor_Reserve_Extend.Status), (int)DateStateEnum.Normal);
......@@ -84,6 +83,10 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Visitor_Reserve_Extend.Visitor_Id), query.Visitor_Id);
}
if (query.ReserveClassId > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Visitor_Reserve_Extend.ReserveClassId), query.ReserveClassId);
}
}
builder.AppendFormat(" ORDER BY A.{0} DESC ", nameof(RB_Visitor_Reserve_Extend.Id));
return GetPage<RB_Visitor_Reserve_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
......
......@@ -49,6 +49,7 @@ namespace Edu.WebApi.Controllers.Duty
Id=base.ParmJObj.GetInt("Id"),
IsQueryAll=base.ParmJObj.GetInt("IsQueryAll"),
Visitor_Id=base.ParmJObj.GetInt("Visitor_Id"),
ReserveClassId=base.ParmJObj.GetInt("ReserveClassId"),
};
if (query.IsQueryAll != 1)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment