You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
797 B
34 lines
797 B
9 months ago
|
package influencer
|
||
|
|
||
|
import (
|
||
|
"github.com/gin-gonic/gin"
|
||
|
"pure/model/response"
|
||
|
"pure/service"
|
||
|
)
|
||
|
|
||
|
// GetBannerList
|
||
|
// @Tags banner
|
||
|
// @Summary 分页获取banner列表【v1.1.0新增】
|
||
|
// @Security ApiKeyAuth
|
||
|
// @accept application/json
|
||
|
// @Produce application/json
|
||
|
// @Success 200 {array} response.BannerListResponse "{"success":true,"data":{},"msg":"获取成功"}"
|
||
|
// @Router /influencer/banner/list [get]
|
||
|
func GetBannerList(c *gin.Context) {
|
||
|
var (
|
||
|
err error
|
||
|
list interface{}
|
||
|
total int64
|
||
|
)
|
||
|
|
||
|
if err, list, total = service.GetBannerList(); err != nil {
|
||
|
////global.MG_LOG.Error("获取失败!", zap.Any("err", err))
|
||
|
response.FailWithMessage("获取失败", c)
|
||
|
} else {
|
||
|
response.OkWithDetailed(response.PageResult{
|
||
|
List: list,
|
||
|
Total: total,
|
||
|
}, "获取成功", c)
|
||
|
}
|
||
|
}
|