Commit eafab7a6 authored by 黄奎's avatar 黄奎

页面修改

parent 50865acc
......@@ -218,6 +218,17 @@ namespace Edu.Module.User
return studentRepository.Exists(where);
}
/// <summary>
/// 跟进电话号码获取学员信息
/// </summary>
/// <param name="Tel"></param>
/// <returns></returns>
public RB_Student_ViewModel GetStuByTelModule(string Tel)
{
var model = studentRepository.GetStuByTelRepository(new RB_Student_ViewModel() { StuTel = Tel });
return model;
}
/// <summary>
/// 添加修改学生
/// </summary>
......
......@@ -473,5 +473,39 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
}
return Get<RB_Student_ViewModel>(builder.ToString(), parameters).ToList();
}
/// <summary>
/// 跟进电话号码获取学员信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public RB_Student_ViewModel GetStuByTelRepository(RB_Student_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT t.*
FROM rb_student AS t
WHERE 1=1
");
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Group_Id), query.Group_Id);
}
if (query.School_Id > -1)
{
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.School_Id), query.School_Id);
}
if (!string.IsNullOrWhiteSpace(query.StuTel))
{
builder.AppendFormat(" AND t.{0}='{1}' ", nameof(RB_Student_ViewModel.StuTel));
}
}
return Get<RB_Student_ViewModel>(builder.ToString(), parameters)?.FirstOrDefault();
}
}
}
\ No newline at end of file
......@@ -976,6 +976,8 @@ namespace Edu.WebApi.Controllers.User
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取学生实体
/// </summary>
......@@ -1033,6 +1035,19 @@ namespace Edu.WebApi.Controllers.User
return ApiResult.Success(data: obj);
}
/// <summary>
/// 跟进电话号码获取学生信息
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetStudentByTel()
{
var StuTel = base.ParmJObj.GetStringValue("StuTel");
var extModel = studentModule.GetStuByTelModule(StuTel);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 获取客户状态列表
/// </summary>
......
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