Commit 9cf9fe54 authored by 黄奎's avatar 黄奎

页面修改

parent af7d8368
using Edu.AOP.CustomerAttribute;
using Edu.Common.Enum;
using Edu.Common.Enum.System;
using Edu.Common.Enum.User;
using Edu.Model.CacheModel;
using Edu.Model.ViewModel.Customer;
......@@ -529,6 +530,47 @@ namespace Edu.Module.User
return studentRepository.GetStudentInfo(Student_Id, Group_Id);
}
/// <summary>
/// 推送消息
/// </summary>
/// <param name="model"></param>
public void PushMessageModule(RB_Student_ViewModel model)
{
var assistList = GetStuAssistListModule(model.StuId);
var customerModel = customerRepository.GetEntity(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 = PushMessageCategoryEnum.B2BCustomerStu,
Content = markdownContent,
CoverImg = "",
CreateByName = "系统",
JumpUrl = "",
WorkMsgType = "markdown",
SendTime = DateTime.Now,
SendType = 0,
Title = "同业查重通知",
Platform = 5,
};
if (model.CreateBy > 0)
{
var queryTargetWorkId = accountModule.GetWorkUserIdModule(model.CreateBy);
modelWork.ReceiveId = queryTargetWorkId;
Common.Message.MessageHelper.SendMessage(modelWork);
}
if (assistList != null && assistList.Count > 0)
{
foreach (var item in assistList)
{
var queryTargetWorkId = accountModule.GetWorkUserIdModule(item.AssistId);
modelWork.ReceiveId = queryTargetWorkId;
Common.Message.MessageHelper.SendMessage(modelWork);
}
}
}
#region 小程序用户
/// <summary>
......
......@@ -7,6 +7,7 @@ using Edu.Cache.WeChat;
using Edu.Common.API;
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using Edu.Common.Enum.System;
using Edu.Common.Enum.User;
using Edu.Common.Plugin;
using Edu.Model.ViewModel.Customer;
......@@ -903,7 +904,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员手机号已绑定同行!请重新录入!";
PushMessage(model);
studentModule.PushMessageModule(model);
}
else
{
......@@ -916,7 +917,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员手机号已绑定同行!请重新录入!";
PushMessage(model);
studentModule.PushMessageModule(model);
}
else
{
......@@ -938,7 +939,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员QQ已绑定同行!请重新录入!";
PushMessage(model);
studentModule.PushMessageModule(model);
}
else
{
......@@ -951,7 +952,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员QQ已绑定同行!请重新录入!";
PushMessage(model);
studentModule.PushMessageModule(model);
}
else
{
......@@ -973,7 +974,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员微信号已绑定同行!请重新录入!";
PushMessage(model);
studentModule.PushMessageModule(model);
}
else
{
......@@ -986,7 +987,7 @@ namespace Edu.WebApi.Controllers.User
if (isB2B)
{
message = "此学员微信号已绑定同行!请重新录入!";
PushMessage(model);
studentModule.PushMessageModule(model);
}
else
{
......@@ -998,42 +999,7 @@ 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.CreateBy.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>
/// 获取收客平台列表
......@@ -1269,7 +1235,7 @@ namespace Edu.WebApi.Controllers.User
if (customer != null)
{
Common.Plugin.LogHelper.Write("查重推送消息");
PushMessage(extModel);
studentModule.PushMessageModule(extModel);
}
}
return ApiResult.Success(data: extModel);
......
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