Skip to content

Commit

Permalink
排除[]
Browse files Browse the repository at this point in the history
  • Loading branch information
hulutech-web committed Oct 21, 2024
1 parent 058ce7a commit 0dc72dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paginator.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (h *HttpResult) SearchByParams(params map[string]string, conditionMap map[s
for key, value := range params {
//如果key包含了[]符号

if value == "" || key == "pageSize" || key == "total" || key == "currentPage" || key == "sort" || key == "order" {
if !strings.Contains(key, "[]") || value == "" || key == "pageSize" || key == "total" || key == "currentPage" || key == "sort" || key == "order" {
continue
} else {
q = q.Where(gorm.Expr(key+" LIKE ?", "%"+value+"%"))
Expand Down

0 comments on commit 0dc72dc

Please sign in to comment.