Commit 639a1315 authored by 吴春's avatar 吴春

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents bded5dea 00707f27
......@@ -37,7 +37,7 @@ namespace Edu.Education
new QuarzHelper().EduCreateScrollChapterTimer().GetAwaiter().GetResult();//预约章节自动生成 2022-02-14
new QuarzHelper().CheckPerparingTimer().GetAwaiter().GetResult();
//new QuarzHelper().PushStuFollowUp().GetAwaiter().GetResult();//推送学员回访
new QuarzHelper().PushStuFollowUp().GetAwaiter().GetResult();//推送学员回访
}
/// <summary>
......
......@@ -380,7 +380,7 @@ namespace Edu.Education.Helper
/// <returns></returns>
public async Task PushStuFollowUp()
{
string cronExpression = "0 0,5,10,15,20,25,30,35,40,45,50,55 * * * ?";//每5分钟执行的一次
NameValueCollection props = new NameValueCollection
{
{ "quartz.serializer.type", "binary" }
......@@ -392,12 +392,36 @@ namespace Edu.Education.Helper
IJobDetail job = JobBuilder.Create<PushStuFollowUpJob>()
.WithIdentity("job12", "group12")
.Build();
ICronTrigger trigger = (ICronTrigger)TriggerBuilder.Create()
.WithIdentity("trigger12", "group12")
.WithCronSchedule(cronExpression)
.Build();
await scheduler.ScheduleJob(job, trigger);
// 创建每天 9:00 点执行的任务触发器
ITrigger trigger1 = TriggerBuilder.Create()
.WithDailyTimeIntervalSchedule(s =>
s.WithIntervalInHours(24)
.OnEveryDay()
.StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(9, 0))
)
.Build();
// 创建每天13:30 点执行的任务触发器
ITrigger trigger2 = TriggerBuilder.Create()
.WithDailyTimeIntervalSchedule(s =>
s.WithIntervalInHours(24)
.OnEveryDay()
.StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(13, 30))
)
.Build();
// 创建每天17:50 点执行的任务触发器
ITrigger trigger3 = TriggerBuilder.Create()
.WithDailyTimeIntervalSchedule(s =>
s.WithIntervalInHours(24)
.OnEveryDay()
.StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(17, 50))
)
.Build();
await scheduler.ScheduleJob(job, trigger1);
await scheduler.ScheduleJob(job, trigger2);
await scheduler.ScheduleJob(job, trigger3);
}
}
......@@ -838,10 +862,10 @@ namespace Edu.Education.Helper
{
try
{
LogHelper.Write("推送学员回访 Start***");
LogHelper.Write(string.Format("{0} 推送学员回访 Start***", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")));
CustomerStudentModule customerStudentModule = new CustomerStudentModule();
var flag= customerStudentModule.PushStudentFollowUpModule();
LogHelper.Write("推送学员回访 End*** Flag:" + flag);
var flag = customerStudentModule.PushStudentFollowUpModule();
LogHelper.Write(string.Format("{0} 推送学员回访 End*** Flag:{1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff"), flag));
}
catch (Exception ex)
{
......
using Edu.Common.Enum.Course;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Model.ViewModel.Scroll
{
......@@ -27,7 +26,7 @@ namespace Edu.Model.ViewModel.Scroll
public string GuestName { get; set; }
/// <summary>
/// 上课方式
/// 上课方式 (1-线下,2-线上,3-录播)
/// </summary>
public int TeachingMethod { get; set; }
......@@ -37,7 +36,7 @@ namespace Edu.Model.ViewModel.Scroll
public decimal ClassProgress { get; set; }
/// <summary>
/// 排课状态
/// 排课状态 0-正常, 1-暂停排课
/// </summary>
public int ScheduleStatus { get; set; }
......@@ -81,6 +80,9 @@ namespace Edu.Model.ViewModel.Scroll
/// </summary>
public string CourseName { get; set; }
/// <summary>
/// 上课记录
/// </summary>
public List<PCourseItem> CourseItems { get; set; }
}
......
......@@ -1743,9 +1743,9 @@ namespace Edu.Module.Customer
}
if (tempStuCreate != null && tempStuCreate.Id > 0 && !string.IsNullOrEmpty(tempStuCreate.WorkUserId) && tempStuCreate.Id != tempCreate.Id)
{
//modelWork.ReceiveId = tempStuCreate.WorkUserId;
//List<Common.Message.PushMessageModel> pushList = new List<Common.Message.PushMessageModel>() { modelWork };
//new Common.Message.MessageHelper().SendMessage(pushList);
modelWork.ReceiveId = tempStuCreate.WorkUserId;
List<Common.Message.PushMessageModel> pushList = new List<Common.Message.PushMessageModel>() { modelWork };
new Common.Message.MessageHelper().SendMessage(pushList);
}
}
}
......
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