Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
639a1315
Commit
639a1315
authored
Aug 30, 2024
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/education
parents
bded5dea
00707f27
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
16 deletions
+42
-16
EducationTimerServer.cs
Edu.EducationCore/EducationTimerServer.cs
+1
-1
QuarzHelper.cs
Edu.EducationCore/Helper/QuarzHelper.cs
+33
-9
ScheduleResult.cs
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
+5
-3
CustomerStudentModule.cs
Edu.Module.Customer/CustomerStudentModule.cs
+3
-3
No files found.
Edu.EducationCore/EducationTimerServer.cs
View file @
639a1315
...
...
@@ -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>
...
...
Edu.EducationCore/Helper/QuarzHelper.cs
View file @
639a1315
...
...
@@ -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
)
{
...
...
Edu.Model/ViewModel/Scroll/ScheduleResult.cs
View file @
639a1315
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
;
}
}
...
...
Edu.Module.Customer/CustomerStudentModule.cs
View file @
639a1315
...
...
@@ -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
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment