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
1a7568ec
Commit
1a7568ec
authored
Feb 22, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a0dcb77f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+1
-1
TimerJobj.cs
Edu.WebApi/Timers/TimerJobj.cs
+14
-2
No files found.
Edu.Module.Course/ClassModule.cs
View file @
1a7568ec
...
...
@@ -5613,7 +5613,7 @@ namespace Edu.Module.Course
{
{
nameof
(
RB_Order_Guest_ViewModel
.
CourseChapterNo
),
tempCourseChapterNo
}
};
//
order_GuestRepository.Update(fileds, new WhereHelper(nameof(RB_Order_Guest_ViewModel.Id), item.Id));
order_GuestRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Order_Guest_ViewModel
.
Id
),
item
.
Id
));
}
}
}
...
...
Edu.WebApi/Timers/TimerJobj.cs
View file @
1a7568ec
...
...
@@ -138,7 +138,7 @@ namespace Edu.WebApi.Timers
dealStudentProgressTimer
=
new
System
.
Timers
.
Timer
()
{
Interval
=
(
1000
*
60
)
*
(
60
*
1
)
//1小时检查一次
Interval
=
(
1000
*
60
)
*
(
1
)
//1小时检查一次
};
dealStudentProgressTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
DealStudentProgressModule
);
dealStudentProgressTimer
.
Enabled
=
true
;
...
...
@@ -172,6 +172,7 @@ namespace Edu.WebApi.Timers
private
static
readonly
string
createMarkDataKey
=
"createMarkDataKey"
;
private
static
readonly
string
dealStudentProgress
=
"dealStudentProgress"
;
/// <summary>
/// 处理学员上课进度
...
...
@@ -182,7 +183,18 @@ namespace Edu.WebApi.Timers
{
if
(
Interlocked
.
Exchange
(
ref
dealstudentprogress_Timer
,
1
)
==
0
)
{
classModule
.
DealStudentCourseChapterNoModule
();
var
currentDate
=
DateTime
.
Now
;
string
cacheData
=
redis
.
Get
(
dealStudentProgress
);
if
(
string
.
IsNullOrEmpty
(
cacheData
))
{
redis
.
Set
(
dealStudentProgress
,
Common
.
ConvertHelper
.
FormatDate
(
currentDate
));
cacheData
=
Common
.
ConvertHelper
.
FormatDate
(
currentDate
);
}
if
(!
string
.
IsNullOrEmpty
(
cacheData
)
&&
cacheData
!=
Common
.
ConvertHelper
.
FormatDate
(
currentDate
))
{
redis
.
Set
(
dealStudentProgress
,
Common
.
ConvertHelper
.
FormatDate
(
currentDate
));
classModule
.
DealStudentCourseChapterNoModule
();
}
//处理学员进度
Interlocked
.
Exchange
(
ref
dealstudentprogress_Timer
,
0
);
}
...
...
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