Commit fb2df615 authored by 黄奎's avatar 黄奎

新增验证

parent fe8707c2
...@@ -78,7 +78,7 @@ namespace Edu.Cache ...@@ -78,7 +78,7 @@ namespace Edu.Cache
/// </summary> /// </summary>
public static string AppletB2B_Login_Info_ public static string AppletB2B_Login_Info_
{ {
get { return "AppletB2B_Login_"; } get { return "AppletB2B_Edu_Login_"; }
} }
} }
......
...@@ -98,6 +98,11 @@ namespace Edu.Common.API ...@@ -98,6 +98,11 @@ namespace Edu.Common.API
/// </summary> /// </summary>
public int AdminId { get; set; } public int AdminId { get; set; }
/// <summary>
/// 审批状态 1-审批通过,2-拒绝
/// </summary>
public int ApproveState { get; set; }
/// <summary> /// <summary>
/// 同行对应的销售编号 /// 同行对应的销售编号
/// </summary> /// </summary>
......
...@@ -201,5 +201,10 @@ namespace Edu.Model.Entity.User ...@@ -201,5 +201,10 @@ namespace Edu.Model.Entity.User
/// 微信号 /// 微信号
/// </summary> /// </summary>
public string WeChatNo { get; set; } public string WeChatNo { get; set; }
/// <summary>
/// 客户类型
/// </summary>
public int StuType { get; set; }
} }
} }
...@@ -233,14 +233,26 @@ namespace Edu.Module.User ...@@ -233,14 +233,26 @@ namespace Edu.Module.User
/// 检查学员是否存在资料库 /// 检查学员是否存在资料库
/// </summary> /// </summary>
/// <param name="model"></param> /// <param name="model"></param>
/// <param name="Type">1-电话,2-QQ,3-微信号</param>
/// <returns></returns> /// <returns></returns>
public bool CheckStudentModule(RB_Student_ViewModel model) public bool CheckStudentModule(RB_Student_ViewModel model,int Type)
{ {
List<WhereHelper> where = new List<WhereHelper>() List<WhereHelper> where = new List<WhereHelper>()
{ {
new WhereHelper(nameof(RB_Student_ViewModel.Group_Id),model.Group_Id), new WhereHelper(nameof(RB_Student_ViewModel.Group_Id),model.Group_Id),
new WhereHelper(nameof(RB_Student_ViewModel.StuTel),model.StuTel),
}; };
if (Type == 1)
{
where.Add(new WhereHelper(nameof(RB_Student_ViewModel.StuTel), model.StuTel));
}
if (Type == 2)
{
where.Add(new WhereHelper(nameof(RB_Student_ViewModel.QQ), model.QQ));
}
if (Type == 3)
{
where.Add(new WhereHelper(nameof(RB_Student_ViewModel.WeChatNo), model.WeChatNo));
}
if (model.StuId > 0) if (model.StuId > 0)
{ {
where.Add(new WhereHelper() where.Add(new WhereHelper()
...@@ -258,10 +270,9 @@ namespace Edu.Module.User ...@@ -258,10 +270,9 @@ namespace Edu.Module.User
/// </summary> /// </summary>
/// <param name="Tel"></param> /// <param name="Tel"></param>
/// <returns></returns> /// <returns></returns>
public RB_Student_ViewModel GetStuByTelModule(string Tel) public RB_Student_ViewModel CheckExistsStuModule(RB_Student_ViewModel query)
{ {
var model = studentRepository.GetStuByTelRepository(new RB_Student_ViewModel() { StuTel = Tel }); var model = studentRepository.GetStuByTelRepository(query);
return model; return model;
} }
......
...@@ -42,6 +42,11 @@ namespace Edu.Repository.User ...@@ -42,6 +42,11 @@ namespace Edu.Repository.User
/// </summary> /// </summary>
private readonly RB_CustomerRepository customerRepository = new RB_CustomerRepository(); private readonly RB_CustomerRepository customerRepository = new RB_CustomerRepository();
/// <summary>
/// 客户类型仓储层对象
/// </summary>
private readonly RB_Student_TypeRepository student_TypeRepository = new RB_Student_TypeRepository();
/// <summary> /// <summary>
/// 获取学生列表 /// 获取学生列表
/// </summary> /// </summary>
...@@ -390,6 +395,12 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an ...@@ -390,6 +395,12 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{ {
logContent += string.Format("微信号:由【{0}】=>【{1}】,", oldModel.WeChatNo, model.WeChatNo); logContent += string.Format("微信号:由【{0}】=>【{1}】,", oldModel.WeChatNo, model.WeChatNo);
} }
if (oldModel.StuType != model.StuType)
{
string oldName = student_TypeRepository.GetEntity(oldModel.StuType)?.Name;
string newName = student_TypeRepository.GetEntity(model.StuType)?.Name;
logContent += string.Format("客户类型:由【{0}】=>【{1}】,", oldName, newName);
}
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() }, {nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() },
...@@ -409,6 +420,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an ...@@ -409,6 +420,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
{nameof(RB_Student_ViewModel.CustomerId),model.CustomerId}, {nameof(RB_Student_ViewModel.CustomerId),model.CustomerId},
{nameof(RB_Student_ViewModel.QQ),model.QQ}, {nameof(RB_Student_ViewModel.QQ),model.QQ},
{nameof(RB_Student_ViewModel.WeChatNo),model.WeChatNo}, {nameof(RB_Student_ViewModel.WeChatNo),model.WeChatNo},
{nameof(RB_Student_ViewModel.StuType),model.StuType},
}; };
//教育后台操作 //教育后台操作
if (model.OperateType == 1) if (model.OperateType == 1)
...@@ -573,7 +585,7 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now()) ...@@ -573,7 +585,7 @@ WHERE 1=1 AND YEARWEEK(date_format(t.CreateTime, '%Y-%m-%d')) = YEARWEEK(now())
} }
/// <summary> /// <summary>
/// 跟进电话号码获取学员信息 /// 根据电话号码、QQ、微信号获取学员信息
/// </summary> /// </summary>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
...@@ -593,10 +605,20 @@ WHERE 1=1 ...@@ -593,10 +605,20 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Group_Id), query.Group_Id); builder.AppendFormat(" AND t.{0}={1} ", nameof(RB_Student_ViewModel.Group_Id), query.Group_Id);
} }
if (!string.IsNullOrWhiteSpace(query.StuTel)) if (!string.IsNullOrWhiteSpace(query.StuTel))
{ {
builder.AppendFormat(" AND t.{0}='{1}' ", nameof(RB_Student_ViewModel.StuTel), query.StuTel); builder.AppendFormat(" AND t.{0}=@StuTel ", nameof(RB_Student_ViewModel.StuTel));
parameters.Add("StuTel", query.StuTel.Trim());
}
if (!string.IsNullOrWhiteSpace(query.QQ))
{
builder.AppendFormat(" AND t.{0}=@QQ ", nameof(RB_Student_ViewModel.QQ));
parameters.Add("QQ", query.StuTel.Trim());
}
if (!string.IsNullOrWhiteSpace(query.WeChatNo))
{
builder.AppendFormat(" AND t.{0}=@WeChatNo ", nameof(RB_Student_ViewModel.WeChatNo));
parameters.Add("WeChatNo", query.WeChatNo.Trim());
} }
} }
return Get<RB_Student_ViewModel>(builder.ToString(), parameters)?.FirstOrDefault(); return Get<RB_Student_ViewModel>(builder.ToString(), parameters)?.FirstOrDefault();
......
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