后台【修复】:修复mysql下报表统计可能存在不排序的情况。

This commit is contained in:
jianweie code
2025-07-21 15:08:53 +08:00
parent 1cefc94d2a
commit 0b1ff1ffb2
2 changed files with 9 additions and 5 deletions

View File

@@ -85,7 +85,8 @@ namespace CoreCms.Net.Services
where 1 = 1
" + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
group by tmp_x.x
order by tmp_x.x;
";
}
Console.WriteLine(sqlStr);
@@ -142,7 +143,8 @@ namespace CoreCms.Net.Services
where 1 = 1
" + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
group by tmp_x.x
order by tmp_x.x;
";
}
@@ -202,7 +204,8 @@ namespace CoreCms.Net.Services
where 1 = 1
" + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
group by tmp_x.x
order by tmp_x.x;
";
}
@@ -259,7 +262,8 @@ namespace CoreCms.Net.Services
where 1 = 1
" + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @"))
group by tmp_x.x
group by tmp_x.x
order by tmp_x.x;
";
}

View File

@@ -236,7 +236,7 @@ namespace CoreCms.Net.Web.Admin.Controllers.Content
whereSql += " and updateTime < '" + getDate.end.ToString("yyyy-MM-dd HH:mm:ss") + "' ";
whereSql += " and status = 2 ";
whereSql += " and type = " + (int)GlobalEnumVars.BillPaymentsType.Common + " ";
data = _reportsServices.GetRefundMark(getDate.num, whereSql, getDate.section, getDate.start, "updateTime");
data = _reportsServices.GetRefundMark(getDate.num, whereSql, getDate.section, getDate.start, "createTime");
data3 = data;
break;
case "充值":