后台【修复】:修复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

@@ -86,6 +86,7 @@ namespace CoreCms.Net.Services
" + where + @" " + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @")) ) 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); Console.WriteLine(sqlStr);
@@ -143,6 +144,7 @@ namespace CoreCms.Net.Services
" + where + @" " + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @")) ) 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;
"; ";
} }
@@ -203,6 +205,7 @@ namespace CoreCms.Net.Services
" + where + @" " + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @")) ) 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;
"; ";
} }
@@ -260,6 +263,7 @@ namespace CoreCms.Net.Services
" + where + @" " + where + @"
) o on tmp_x.x = ((unix_timestamp(o." + joinVal + @") - " + CommonHelper.ConvertDateTimeToInt(sTime) + @") div(" + section + @")) ) 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 updateTime < '" + getDate.end.ToString("yyyy-MM-dd HH:mm:ss") + "' ";
whereSql += " and status = 2 "; whereSql += " and status = 2 ";
whereSql += " and type = " + (int)GlobalEnumVars.BillPaymentsType.Common + " "; 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; data3 = data;
break; break;
case "充值": case "充值":