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
e41baf5f
Commit
e41baf5f
authored
Mar 03, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
525cd98d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
7 deletions
+24
-7
StudentStatModule.cs
Edu.Module.User/StudentStatModule.cs
+10
-4
StudentStatController.cs
Edu.WebApi/Controllers/User/StudentStatController.cs
+1
-1
TimerJobj.cs
Edu.WebApi/Timers/TimerJobj.cs
+13
-2
No files found.
Edu.Module.User/StudentStatModule.cs
View file @
e41baf5f
...
...
@@ -2916,11 +2916,14 @@ namespace Edu.Module.User
/// <param name="StartTime">开始时间</param>
/// <param name="EndTime">结束时间</param>
/// <returns></returns>
public
bool
CreateStudentStaticModule
(
UserInfo
user
,
string
StartTime
,
string
EndTime
)
public
bool
CreateStudentStaticModule
(
UserInfo
user
,
string
StartTime
,
string
EndTime
,
bool
isInit
=
true
)
{
bool
flag
=
true
;
string
empIds
=
""
;
student_StaticRepository
.
DeleteStudentStaticByProcRepository
();
if
(
isInit
)
{
student_StaticRepository
.
DeleteStudentStaticByProcRepository
();
}
var
date
=
Convert
.
ToDateTime
(
StartTime
);
var
endTime
=
Convert
.
ToDateTime
(
EndTime
);
int
Days
=
(
endTime
-
date
).
Days
;
...
...
@@ -3220,11 +3223,14 @@ namespace Edu.Module.User
/// <param name="StartTime">开始时间</param>
/// <param name="EndTime">结束时间</param>
/// <returns></returns>
public
bool
CreateStudentMarketModule
(
UserInfo
user
,
string
StartTime
,
string
EndTime
)
public
bool
CreateStudentMarketModule
(
UserInfo
user
,
string
StartTime
,
string
EndTime
,
bool
isInit
=
true
)
{
bool
flag
=
true
;
string
empIds
=
""
;
student_MarketRepository
.
DeleteStudentMarketByProcRepository
();
if
(
isInit
)
{
student_MarketRepository
.
DeleteStudentMarketByProcRepository
();
}
var
date
=
Convert
.
ToDateTime
(
StartTime
);
var
endTime
=
Convert
.
ToDateTime
(
EndTime
);
int
Days
=
(
endTime
-
date
).
Days
;
...
...
Edu.WebApi/Controllers/User/StudentStatController.cs
View file @
e41baf5f
...
...
@@ -1030,7 +1030,7 @@ namespace Edu.WebApi.Controllers.User
StartTime
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
}
StartTime
=
"2021-12-21"
;
string
EndTime
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
);
string
EndTime
=
Common
.
ConvertHelper
.
FormatDate
(
DateTime
.
Now
.
AddDays
(-
1
)
);
bool
flag
=
studentStatModule
.
CreateStudentMarketModule
(
userInfo
,
StartTime
,
EndTime
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
Edu.WebApi/Timers/TimerJobj.cs
View file @
e41baf5f
using
Edu.CacheManager.Base
;
using
Edu.Cache.User
;
using
Edu.CacheManager.Base
;
using
Edu.Common.Plugin
;
using
Edu.Model.CacheModel
;
using
Edu.Module.Course
;
using
Edu.Module.Customer
;
using
Edu.Module.Duty
;
using
Edu.Module.EduTask
;
using
Edu.Module.Exam
;
using
Edu.Module.User
;
using
System
;
using
System.IO
;
using
System.Threading
;
...
...
@@ -46,6 +49,11 @@ namespace Edu.WebApi.Timers
/// </summary>
private
static
readonly
ClassModule
classModule
=
new
ClassModule
();
/// <summary>
/// 学员数据统计处理类
/// </summary>
private
static
readonly
StudentStatModule
studentStatModule
=
new
StudentStatModule
();
/// <summary>
/// 使用redis第几号库
/// </summary>
...
...
@@ -131,7 +139,7 @@ namespace Edu.WebApi.Timers
marketTimer
=
new
System
.
Timers
.
Timer
()
{
Interval
=
(
1000
*
60
)
*
(
1
0
)
//10分钟执行一次
Interval
=
(
1000
*
60
)
*
(
1
)
//10分钟执行一次
};
marketTimer
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
DealMarketConsultantData
);
marketTimer
.
Enabled
=
true
;
...
...
@@ -221,6 +229,9 @@ namespace Edu.WebApi.Timers
redis
.
Set
(
createMarkDataKey
,
Common
.
ConvertHelper
.
FormatDate
(
currentDate
));
marketConsultantModule
.
CreateConsultantDataModule
(
currentDate
);
marketConsultantModule
.
CreateMarketDataModule
(
currentDate
);
UserInfo
user
=
UserReidsCache
.
GetUserLoginInfo
(
"1"
);
studentStatModule
.
CreateStudentStaticModule
(
user
,
Common
.
ConvertHelper
.
FormatDate
(
currentDate
.
AddDays
(-
1
)),
Common
.
ConvertHelper
.
FormatDate
(
currentDate
),
isInit
:
false
);
}
Interlocked
.
Exchange
(
ref
marketconsultant_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