mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 09:15:27 +08:00 
			
		
		
		
	- 修复 WhereDynamicFilter 多级 Logic 未生效的 bug;
This commit is contained in:
		@@ -486,5 +486,14 @@
 | 
				
			|||||||
            <param name="that"></param>
 | 
					            <param name="that"></param>
 | 
				
			||||||
            <returns></returns>
 | 
					            <returns></returns>
 | 
				
			||||||
        </member>
 | 
					        </member>
 | 
				
			||||||
 | 
					        <member name="M:Microsoft.Extensions.DependencyInjection.FreeSqlRepositoryDependencyInjection.AddFreeRepository(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Action{FreeSql.FluentDataFilter},System.Reflection.Assembly[])">
 | 
				
			||||||
 | 
					            <summary>
 | 
				
			||||||
 | 
					            批量注入 Repository,可以参考代码自行调整
 | 
				
			||||||
 | 
					            </summary>
 | 
				
			||||||
 | 
					            <param name="services"></param>
 | 
				
			||||||
 | 
					            <param name="globalDataFilter"></param>
 | 
				
			||||||
 | 
					            <param name="assemblies"></param>
 | 
				
			||||||
 | 
					            <returns></returns>
 | 
				
			||||||
 | 
					        </member>
 | 
				
			||||||
    </members>
 | 
					    </members>
 | 
				
			||||||
</doc>
 | 
					</doc>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -159,6 +159,16 @@ namespace FreeSql.Tests
 | 
				
			|||||||
        [Fact]
 | 
					        [Fact]
 | 
				
			||||||
        public void Test03()
 | 
					        public void Test03()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					            var sql123 = g.sqlserver.Select<Edi>()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                .WithSql(
 | 
				
			||||||
 | 
					                    g.sqlserver.Select<Edi>().ToSql(a => new { a.Id }, FieldAliasOptions.AsProperty) + 
 | 
				
			||||||
 | 
					                    " UNION ALL " +
 | 
				
			||||||
 | 
					                    g.sqlserver.Select<Edi>().ToSql(a => new { a.Id }, FieldAliasOptions.AsProperty))
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
 | 
					                .Page(1, 10).ToSql("Id");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var sqlextGroupConcat = g.mysql.Select<Edi, EdiItem>()
 | 
					            var sqlextGroupConcat = g.mysql.Select<Edi, EdiItem>()
 | 
				
			||||||
                .InnerJoin((a, b) => b.Id == a.Id)
 | 
					                .InnerJoin((a, b) => b.Id == a.Id)
 | 
				
			||||||
                .ToSql((a, b) => new
 | 
					                .ToSql((a, b) => new
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1169,7 +1169,7 @@ namespace FreeSql.Internal.CommonProvider
 | 
				
			|||||||
                {
 | 
					                {
 | 
				
			||||||
                    if (string.IsNullOrEmpty(fi.Field) == false || fi.Filters?.Any() == true)
 | 
					                    if (string.IsNullOrEmpty(fi.Field) == false || fi.Filters?.Any() == true)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        switch (filter.Logic)
 | 
					                        switch (logic)
 | 
				
			||||||
                        {
 | 
					                        {
 | 
				
			||||||
                            case DynamicFilterLogic.And: sb.Append(" AND "); break;
 | 
					                            case DynamicFilterLogic.And: sb.Append(" AND "); break;
 | 
				
			||||||
                            case DynamicFilterLogic.Or: sb.Append(" OR "); break;
 | 
					                            case DynamicFilterLogic.Or: sb.Append(" OR "); break;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user