fix:Invalid post search criteria
This commit is contained in:
1 parent
494ee18b9f
commit
2280ce2b57
2 files changed
+18
-14
No files matched your search
@@ -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