mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:13:26 +08:00
【修复】修复mysql下报表统计异常问题,优化显示数量问题。
This commit is contained in:
@@ -733,5 +733,19 @@ namespace CoreCms.Net.Utility.Helper
|
||||
// 如果上传文件大于限定的容量
|
||||
return !(fileSize > size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 10位时间戳 转化
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <returns></returns>
|
||||
public static long ConvertDateTimeToInt(System.DateTime time)
|
||||
{
|
||||
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
|
||||
long t = (time.Ticks - startTime.Ticks) / 10000000; //除10000000调整为10位
|
||||
return t;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,29 +110,29 @@ namespace CoreCms.Net.Utility.Helper
|
||||
case 3600: //小时
|
||||
if (dateArr.num <= 24)
|
||||
{
|
||||
xType = "H时";
|
||||
xType = "d日H时";
|
||||
}
|
||||
else if (dateArr.num <= 720)
|
||||
{
|
||||
xType = "d日H时";
|
||||
xType = "M月d日H时";
|
||||
}
|
||||
else
|
||||
{
|
||||
xType = "m月d日H时";
|
||||
xType = "M月d日H时";
|
||||
}
|
||||
break;
|
||||
case 86400: //天
|
||||
if (dateArr.num <= 31)
|
||||
{
|
||||
xType = "d号";
|
||||
xType = "M月d号";
|
||||
}
|
||||
else if (dateArr.num <= 365)
|
||||
{
|
||||
xType = "m.d";
|
||||
xType = "yyyy年M月dd日";
|
||||
}
|
||||
else
|
||||
{
|
||||
xType = "Y.m.d";
|
||||
xType = "yyyy年M月dd日";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user