|
@@ -454,7 +454,7 @@ func BannerList(c *gin.Context) {
|
|
|
page, _ := strconv.Atoi(c.Query("page"))
|
|
|
limit, _ := strconv.Atoi(c.Query("limit"))
|
|
|
enable, _ := strconv.Atoi(c.Query("enable"))
|
|
|
- cond := " "
|
|
|
+ cond := ""
|
|
|
if enable == 0 {
|
|
|
cond += " enable = 0 "
|
|
|
} else {
|
|
@@ -473,3 +473,29 @@ func BannerList(c *gin.Context) {
|
|
|
|
|
|
response.OkData("获取成功", list, c)
|
|
|
}
|
|
|
+
|
|
|
+// BannerHistoryList banner历史图列表
|
|
|
+// @Tags 公共模块
|
|
|
+// @Summary banner图列表
|
|
|
+// @Description banner图列表
|
|
|
+// @Security ApiKeyAuth
|
|
|
+// @securityDefinitions.basic BasicAuth
|
|
|
+// @Accept json
|
|
|
+// @Product json
|
|
|
+// @Success 200 {string} string 获取验证码成功
|
|
|
+// @Failure 400 {string} string 请输入邮箱地址
|
|
|
+// @Router /banner_history/list [get]
|
|
|
+func BannerHistoryList(c *gin.Context) {
|
|
|
+ page, _ := strconv.Atoi(c.Query("page"))
|
|
|
+ limit, _ := strconv.Atoi(c.Query("limit"))
|
|
|
+ cond := ""
|
|
|
+ cond += " enable = 0 "
|
|
|
+
|
|
|
+ list, err := banner.GetBannerList(cond, page, limit)
|
|
|
+ if err != nil {
|
|
|
+ response.FailMsg("获取失败", "获取banner失败, Err: "+err.Error(), c)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ response.OkData("获取成功", list, c)
|
|
|
+}
|