Commit ae14a38d authored by 黄奎's avatar 黄奎

页面修改

parent 66fe96be
......@@ -19,8 +19,39 @@ namespace Edu.Test
//var list = Common.Plugin.FileHelper.GetFileAllPath(filePath, newPath);
//string str = Common.Plugin.JsonHelper.Serialize(list);
//Console.WriteLine(str);
var str = ConvertStringToDateTime("1492617600");
Console.WriteLine(str);
var date = new DateTime(2022, 3, 21, 0, 0, 0);
var res1= ConvertDateTimeInt(date);
Console.WriteLine(res1);
Console.WriteLine("End......");
Console.ReadKey();
}
/// <summary>
/// 将c# DateTime时间格式转换为Unix时间戳格式
/// </summary>
/// <param name="time">时间</param>
/// <returns>double</returns>
private static double ConvertDateTimeInt(DateTime time)
{
DateTime dd = new DateTime(1970, 1, 1, 0, 0, 0, 0);
TimeSpan ts = (time - dd);
return (Int64)ts.TotalMilliseconds;
}
/// <summary>
/// 时间戳转为C#格式时间
/// </summary>
/// <param name=”timeStamp”></param>
/// <returns></returns>
public static DateTime ConvertStringToDateTime(string timeStamp)
{
DateTime dtStart = TimeZoneInfo.ConvertTime(new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc), TimeZoneInfo.Local);
long lTime = long.Parse(timeStamp + "0000");
TimeSpan toNow = new TimeSpan(lTime);
return dtStart.Add(toNow);
}
}
}
......@@ -68,7 +68,6 @@ namespace Edu.WebApi.Controllers.User
[AllowAnonymous]
public ApiResult Test()
{
Edu.ThirdCore.QYWinXin.QYWeiXinHelper.GetWeChatCheck();
return ApiResult.Success();
}
......
......@@ -67,6 +67,11 @@ namespace Edu.WebApi.Timers
/// </summary>
private static readonly MarketConsultantModule marketConsultantModule = new MarketConsultantModule();
/// <summary>
/// 教师行为数据统计
/// </summary>
private static readonly TeacherStaticModule teacherStaticModule = new TeacherStaticModule();
static System.Timers.Timer timer1;//计时器
static System.Timers.Timer timer2;//定期处理未值班数据
......@@ -242,9 +247,11 @@ namespace Edu.WebApi.Timers
marketConsultantModule.CreateConsultantDataModule(today);
marketConsultantModule.CreateMarketDataModule(today);
UserInfo user = UserReidsCache.GetUserLoginInfo("1");
studentStatModule.CreateStudentStaticModule(user, Common.ConvertHelper.FormatDate(today.AddDays(-1)), currentDate, isInit: false);
studentStatModule.CreateStudentMarketModule(user, Common.ConvertHelper.FormatDate(today.AddDays(-1)), currentDate, isInit: false);
studentStatModule.CreateStudentCompanyModule(user, Common.ConvertHelper.FormatDate(today.AddDays(-1)), currentDate, isInit: false);
var startDate = Common.ConvertHelper.FormatDate(today.AddDays(-1));
studentStatModule.CreateStudentStaticModule(user, startDate, currentDate, isInit: false);
studentStatModule.CreateStudentMarketModule(user, startDate, currentDate, isInit: false);
studentStatModule.CreateStudentCompanyModule(user, startDate, currentDate, isInit: false);
teacherStaticModule.CreateTeacherStaticModule(user, startDate, currentDate, isInit: false);
redis.Set(createMarkDataKey, currentDate);
}
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