mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-21 10:13:01 +00:00
fix:Invalid post search criteria
This commit is contained in:
@@ -90,6 +90,9 @@ func (e *Post) GetPage(pageSize int, pageIndex int) ([]Post, int, error) {
|
||||
if e.PostName != "" {
|
||||
table = table.Where("post_name = ?", e.PostName)
|
||||
}
|
||||
if e.PostCode != "" {
|
||||
table = table.Where("post_code = ?", e.PostCode)
|
||||
}
|
||||
if e.Status != "" {
|
||||
table = table.Where("status = ?", e.Status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user