Skip to content

Feesql 扩展中添加 Searchs 会导致异常 #3462

@j4587698

Description

@j4587698

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

目前的Freesql扩展使用搜索时会报sql错误。
检查发现在ToDynamicFilter方法中仅判断了if (actions.Filters != null)
SearchFilterActionGetFilterConditions并没有给Filters 赋值
就会导致产生一个key和value都为null的条件,freesql转为sql时就会产生一个(())的条件,sql异常

Expected Behavior

搜索栏输入任意内容
image

此时searches里有一条数据
image

这时候SearchFilterAction中由于没有加Filter,所以actions.Filters是null
image

这时候item里内容都为null,所以会产生一个(())的条件
image

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions