Commit bc9c22d7 authored by 黄奎's avatar 黄奎

推送调整

parent 4b230b4a
......@@ -30,6 +30,7 @@ using Edu.Model.Entity.Reserve;
using Edu.Model.Public;
using Edu.Module.User;
using Senparc.Weixin.MP.AdvancedAPIs;
using Edu.Model.ViewModel.Sell;
namespace Edu.Module.Duty
{
......@@ -313,31 +314,14 @@ namespace Edu.Module.Duty
if (queryNotifyManager != null && queryNotifyManager.Count > 0)
{
queryNotifyManager.ForEach(x =>
{
var path = $"/h5page/TrialClass?Id={model.Id}";//这个地址是欠费的通知地址,后续有H5需要改
path = HttpUtility.UrlEncode(path);
string newUrl = $"{Config.ErpUrl}/login?loginId={x.Id}&target={path}";
Common.Plugin.LogHelper.WriteInfo("试听推送::" + newUrl);
string markdownContent = $"<font color='info'>学员试听课通知</font>\n>**概要信息** \n>学员名称:<font color='warning'>{guestModel.StuName}({guestModel.StuRealMobile})</font>\n>预约时间:<font color='warning'>{Common.ConvertHelper.FormatDate(model.ReservationDate)}</font>\n>试听需求:<font color='warning'>{Common.Plugin.StringHelper.FilterHtml(model.Demand)}次课)</font>\n>请 点 击:[查看详情]({newUrl})";
Common.Message.PushMessageModel modelWork = new Common.Message.PushMessageModel()
{
CategoryId = PushMessageCategoryEnum.ReserveClass,
Content = markdownContent,
CoverImg = "",
CreateByName = "系统",
JumpUrl = "",
WorkMsgType = "markdown",
SendTime = DateTime.Now,
SendType = 0,
Title = "学员试听课通知",
Platform = 5,
ReceiveId = x.WorkUserId??""
};
List<Common.Message.PushMessageModel> pushList = new List<Common.Message.PushMessageModel>() { modelWork };
new Common.Message.MessageHelper().SendMessage(pushList);
LogHelper.WriteInfo("学员试听课通知:" + JsonHelper.Serialize(pushList)) ;
var content = $"<font color='info'>学员试听课通知</font>\n>**概要信息** \n>学员名称:<font color='warning'>{guestModel.StuName}({guestModel.StuRealMobile})</font>\n>预约时间:<font color='warning'>{Common.ConvertHelper.FormatDate(model.ReservationDate)}</font>\n>试听需求:<font color='warning'>{Common.Plugin.StringHelper.FilterHtml(model.Demand)}</font>\n>请 点 击:[查看详情]({newUrl})";
PushWorkChatHelper.PushToWorkChat(content, x.WorkUserId, "学员试听课通知");
});
}
#endregion
......
......@@ -43,6 +43,7 @@ WHERE 1=1 AND B.OrderState=1 AND A.GuestState in(1,5) AND B.OrderType=1 AND E.Cl
{
builder.AppendFormat(" AND cs.CourseRate IN({0}) ", (int)query.QCourseRate);
}
builder.AppendFormat(" ORDER BY A.OrderId DESC ");
var list = Get<SchedulePlanResult>(builder.ToString()).ToList();
......
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