From 2b5c893619ddf0955feafcfb4993009723ac4a17 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期五, 29 三月 2024 15:34:18 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/SRM --- api/v1/test/product.go | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/api/v1/test/product.go b/api/v1/test/product.go index a962d3f..cca3717 100644 --- a/api/v1/test/product.go +++ b/api/v1/test/product.go @@ -159,16 +159,17 @@ // @accept application/json // @Produce application/json // @Param data query testReq.ProductSearch true "鍒嗛〉鑾峰彇Product鍒楄〃" +// @Param Authorization header string true "token" // @Success 200 {string} string "{"success":true,"data":{},"msg":"鑾峰彇鎴愬姛"}" // @Router /p/getProductList [get] func (pApi *ProductApi) GetProductList(c *gin.Context) { - var pageInfo testReq.ProductSearch - err := c.ShouldBindQuery(&pageInfo) + var params testReq.ProductSearch + err := c.ShouldBindQuery(¶ms) if err != nil { response.FailWithMessage(err.Error(), c) return } - list, total, err := pService.GetProductInfoList(pageInfo) + list, total, err := pService.GetProductInfoList(params) if err != nil { global.GVA_LOG.Error("鑾峰彇澶辫触!", zap.Error(err)) response.FailWithMessage("鑾峰彇澶辫触", c) @@ -200,8 +201,8 @@ response.OkWithDetailed(response.PageResult{ List: list, Total: total, - Page: pageInfo.Page, - PageSize: pageInfo.PageSize, + Page: params.Page, + PageSize: params.PageSize, }, "鑾峰彇鎴愬姛", c) } -- Gitblit v1.8.0