Skip to content

Commit 594ad86

Browse files
committed
调整测试
1 parent 200c45a commit 594ad86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

paginator.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ func (h *HttpResult) SearchByParams(params map[string]string, conditionMap map[s
3737
delete(params, except)
3838
}
3939
query := facades.Orm().Query()
40+
for key, val := range conditionMap {
41+
query = query.Raw(key+" = ?", val).(orm.Query)
42+
}
4043
h.Query = func(q orm.Query) orm.Query {
4144
for key, value := range params {
4245
if value == "" || key == "pageSize" || key == "total" || key == "currentPage" || key == "sort" || key == "order" {
@@ -47,9 +50,6 @@ func (h *HttpResult) SearchByParams(params map[string]string, conditionMap map[s
4750
q = q.Raw(key+" like ?", "%"+value+"%").(orm.Query)
4851
}
4952
}
50-
for key, val := range conditionMap {
51-
q = q.Raw(key+" = ?", val).(orm.Query)
52-
}
5353
return q
5454
}(query)
5555
return h

0 commit comments

Comments
 (0)