修复排序错误

This commit is contained in:
2023-11-16 14:55:37 +08:00
parent 5b49890a4f
commit a5f3d473e6
15 changed files with 261 additions and 154 deletions

View File

@@ -56,9 +56,9 @@ internal class VmQueryParser
{
// t1.t2.id
List<string> outputs = output.Split(',').Distinct().ToList();
foreach (string? outStr in outputs)
foreach (string? s in outputs)
{
_ = ClearStr(outStr);
var outStr = ClearStr(s);
if (string.IsNullOrWhiteSpace(outStr))
{
continue;
@@ -126,15 +126,15 @@ internal class VmQueryParser
}
string[] orders = sort.Split(',');
foreach (string orderStr in orders)
foreach (string s in orders)
{
_ = ClearStr(orderStr);
var orderStr = ClearStr(s);
if (string.IsNullOrWhiteSpace(orderStr))
{
continue;
}
// 拆分 m.code desc
string[] codes = orderStr.Split(' ', 1);
string[] codes = orderStr.Split(' ', 2);
// 拆分 m.code
(string?, string) orderPath = codes[0].GetParent(NAVI_SEPERATE);
orderPath.Item1 ??= MAIN_ALIES;