Commit d94c53d6 authored by 黄奎's avatar 黄奎

页面修改

parent 571bfaf1
......@@ -324,6 +324,20 @@ namespace Edu.Module.User
return flag;
}
/// <summary>
/// 获取协助人员列表
/// </summary>
/// <param name="StuId"></param>
/// <returns></returns>
public List<RB_Student_Assist_Extend> GetStuAssistListModule(int StuId)
{
var list = student_AssistRepository.GetStudentAssistListRepository(new RB_Student_Assist_Extend()
{
StuId = StuId
});
return list;
}
/// <summary>
/// 学员转交
......
......@@ -617,7 +617,7 @@ WHERE 1=1
if (!string.IsNullOrWhiteSpace(query.QQ))
{
builder.AppendFormat(" AND t.{0}=@QQ ", nameof(RB_Student_ViewModel.QQ));
parameters.Add("QQ", query.StuTel.Trim());
parameters.Add("QQ", query.QQ.Trim());
}
if (!string.IsNullOrWhiteSpace(query.WeChatNo))
{
......
......@@ -13,6 +13,7 @@ using Edu.Model.ViewModel.Customer;
using Edu.Model.ViewModel.Log;
using Edu.Model.ViewModel.User;
using Edu.Module.Course;
using Edu.Module.Customer;
using Edu.Module.Duty;
using Edu.Module.Log;
using Edu.Module.User;
......@@ -103,6 +104,11 @@ namespace Edu.WebApi.Controllers.User
/// </summary>
private readonly DutyPlanModule dutyPlanModule = AOP.AOPHelper.CreateAOPObject<DutyPlanModule>();
/// <summary>
/// 同业处理类对象
/// </summary>
private readonly CustomerModule customerModule = new CustomerModule();
#region 用户账户管理
/// <summary>
......@@ -878,6 +884,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员手机号已绑定同行!请重新录入!";
PushMessage(model);
}
else
{
......@@ -911,8 +918,10 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员QQ已绑定同行!请重新录入!";
PushMessage(model);
}
else {
else
{
message = string.Format("此学员QQ号已被【{0}】于【{1}】注册。", name, Common.ConvertHelper.FormatTime(model.CreateTime));
}
}
......@@ -956,6 +965,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员微信已绑定同行!请重新录入!";
PushMessage(model);
}
else
{
......@@ -967,6 +977,43 @@ namespace Edu.WebApi.Controllers.User
return !string.IsNullOrEmpty(message) ? ApiResult.Failed(message: message) : ApiResult.Success();
}
/// <summary>
/// 推送消息
/// </summary>
/// <param name="model"></param>
public void PushMessage(RB_Student_ViewModel model)
{
var assistList = studentModule.GetStuAssistListModule(model.StuId);
var customerModel = customerModule.GetCustomerModule(model.CustomerId);
string markdownContent = $"`同业添加学生查重通知` \n>**概要信息** \n>同业名称:{customerModel?.CustomerName ?? ""}({customerModel?.ContactNumber ?? ""})\n>学生名称:{model.StuName}\n>学生电话:{model.StuTel}\n>";
Common.Message.PushMessageModel modelWork = new Common.Message.PushMessageModel()
{
CategoryId = Common.Enum.System.PushMessageCategoryEnum.B2BCustomerStu,
Content = markdownContent,
CoverImg = "",
CreateByName = "系统",
JumpUrl = "",
WorkMsgType = "markdown",
SendTime = DateTime.Now,
SendType = 0,
Title = "同业添加学生通知",
Platform = 5,
};
if (model.CreateBy > 0)
{
modelWork.ReceiveId = model.CreateType.ToString();
Common.Message.MessageHelper.SendMessage(modelWork);
}
if (assistList != null && assistList.Count > 0)
{
foreach (var item in assistList)
{
modelWork.ReceiveId = item.AssistId.ToString();
Common.Message.MessageHelper.SendMessage(modelWork);
}
}
}
/// <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