|
@@ -13,7 +13,23 @@ import (
|
|
* @param *gin.Context
|
|
* @param *gin.Context
|
|
* @return json
|
|
* @return json
|
|
*/
|
|
*/
|
|
-func GetPageList(c *gin.Context) {
|
|
|
|
|
|
+
|
|
|
|
+// GetPageList 活动列表
|
|
|
|
+// @Tags 活动模块
|
|
|
|
+// @Summary 活动列表
|
|
|
|
+// @Description 获取活动列表
|
|
|
|
+// @Security ApiKeyAuth
|
|
|
|
+// @Param Authorization header string true "Bearer 31a165baebe6dec616b1f8f3207b4273"
|
|
|
|
+// @Accept json
|
|
|
|
+// @Product json
|
|
|
|
+// @Param activity_name query string false "活动名称"
|
|
|
|
+// @Param activity_type_name query string false "活动类别"
|
|
|
|
+// @Param active_state query int false "活动状态"
|
|
|
|
+// @Param page query int false "当前页码"
|
|
|
|
+// @Param limit query int false "每页数量"
|
|
|
|
+// @Success 200 {object} []yb_activity.YbActivity
|
|
|
|
+// @Router /activity/getPageList [get]
|
|
|
|
+func GetPageList(c *gin.Context) {
|
|
where := _handleListQuery(c)
|
|
where := _handleListQuery(c)
|
|
page, limit := _handlePageParam(c)
|
|
page, limit := _handlePageParam(c)
|
|
listData, err := activity.PageList(where, page, limit)
|
|
listData, err := activity.PageList(where, page, limit)
|
|
@@ -46,4 +62,4 @@ func _handlePageParam(c *gin.Context) (page int, limit int) {
|
|
page, _ = strconv.Atoi(c.Query("page"))
|
|
page, _ = strconv.Atoi(c.Query("page"))
|
|
limit, _ = strconv.Atoi(c.Query("limit"))
|
|
limit, _ = strconv.Atoi(c.Query("limit"))
|
|
return
|
|
return
|
|
-}
|
|
|
|
|
|
+}
|