Commit 4a373c7c authored by 黄奎's avatar 黄奎

新增查询条件

parent 85da869e
...@@ -151,5 +151,15 @@ namespace Edu.Model.ViewModel.User ...@@ -151,5 +151,15 @@ namespace Edu.Model.ViewModel.User
/// 是否查询自己的客户(1-是) /// 是否查询自己的客户(1-是)
/// </summary> /// </summary>
public int IsQueryMyStu { get; set; } public int IsQueryMyStu { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public string EndTime { get; set; }
} }
} }
\ No newline at end of file
...@@ -154,6 +154,18 @@ WHERE 1=1 ...@@ -154,6 +154,18 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CustomerId), query.CustomerId); builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.CustomerId), query.CustomerId);
} }
if (query.StuStage > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.StuStage), (int)query.StuStage);
}
if (!string.IsNullOrEmpty(query.StartTime))
{
builder.AppendFormat(" AND t.{0}>='{1}' ", nameof(RB_Student_ViewModel.CreateTime),query.StartTime);
}
if (!string.IsNullOrEmpty(query.EndTime))
{
builder.AppendFormat(" AND t.{0}<='{1} 23:59:59' ", nameof(RB_Student_ViewModel.CreateTime), query.EndTime);
}
} }
builder.AppendFormat(" ORDER BY t.{0} DESC ", nameof(RB_Student_ViewModel.StuId)); builder.AppendFormat(" ORDER BY t.{0} DESC ", nameof(RB_Student_ViewModel.StuId));
return GetPage<RB_Student_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList(); return GetPage<RB_Student_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
......
...@@ -657,7 +657,10 @@ namespace Edu.WebApi.Controllers.User ...@@ -657,7 +657,10 @@ namespace Edu.WebApi.Controllers.User
StuTel = base.ParmJObj.GetStringValue("StuTel"), StuTel = base.ParmJObj.GetStringValue("StuTel"),
CreateBy = base.ParmJObj.GetInt("CreateBy"), CreateBy = base.ParmJObj.GetInt("CreateBy"),
IsQueryMyStu = base.ParmJObj.GetInt("IsQueryMyStu"), IsQueryMyStu = base.ParmJObj.GetInt("IsQueryMyStu"),
CustomerId = base.ParmJObj.GetInt("CustomerId") CustomerId = base.ParmJObj.GetInt("CustomerId"),
StuStage=(StuStageEnum)base.ParmJObj.GetInt("StuStage"),
StartTime=base.ParmJObj.GetStringValue("StartTime"),
EndTime=base.ParmJObj.GetStringValue("EndTime"),
}; };
if (query.IsQueryMyStu == 1) if (query.IsQueryMyStu == 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