Commit e41baf5f authored by 黄奎's avatar 黄奎

页面修改

parent 525cd98d
......@@ -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;
......
......@@ -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();
}
......
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) * (10) //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);
}
......
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