zwxi 11 months ago
parent
commit
61861b9ae9
1 changed files with 3 additions and 3 deletions
  1. 3 3
      controller/public.go

+ 3 - 3
controller/public.go

@@ -456,13 +456,13 @@ func BannerList(c *gin.Context) {
 	enable, _ := strconv.Atoi(c.Query("enable"))
 	cond := "  "
 	if enable == 0 {
-		cond = " enable = 0 "
+		cond += " enable = 0 "
 	} else {
-		cond = " enable = 1 "
+		cond += " enable = 1 "
 	}
 
 	if isHomepage != 1 {
-		cond = " AND id <> 9999"
+		cond += " AND id <> 9999"
 	}
 
 	list, err := banner.GetBannerList(cond, page, limit)