- 修复 GroupBy + WithTempQuery + 子查询参数化问题;#1965

This commit is contained in:
2881099
2025-01-16 13:13:56 +08:00
parent dc1e8cf9cc
commit 92ff134a05
2 changed files with 14 additions and 1 deletions

View File

@@ -620,6 +620,18 @@ namespace base_entity
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
#endregion
var p_0 = "x1";
var p_0r1 = fsql.Select<User1>().Where(a => a.Nickname == p_0)
.GroupBy(a => a.GroupId)
.WithTempQuery(a => new
{
GroupId = a.Key,
Sum = fsql.Select<UserGroup>()
.Where(b => b.Id == a.Key && b.GroupName == p_0)
.Sum(b => b.Id)
})
.ToList();
fsql.Delete<RequestEntity>().Where("1=1").ExecuteAffrows();
fsql.Delete<RequestDetailEntity>().Where("1=1").ExecuteAffrows();
fsql.Insert(new RequestEntity