| | |
| | | response.OkWithMessage("修改成功", c) |
| | | } |
| | | } |
| | | |
| | | // GetSupplierProductList 获取供应商提供产品列表 |
| | | // @Tags Supplier |
| | | // @Summary 获取供应商提供产品列表 |
| | | // @Security ApiKeyAuth |
| | | // @accept application/json |
| | | // @Produce application/json |
| | | // @Param data query testReq.SupplierProduct true "获取供应商提供产品列表" |
| | | // @Param Authorization header string true "token" |
| | | // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" |
| | | // @Router /s/getSupplierProductList [get] |
| | | func (sApi *SupplierApi) GetSupplierProductList(c *gin.Context) { |
| | | var params testReq.SupplierProduct |
| | | err := c.ShouldBindQuery(¶ms) |
| | | if err != nil { |
| | | response.FailWithMessage(err.Error(), c) |
| | | return |
| | | } |
| | | list, total, err := sService.GetSupplierProduct(params) |
| | | if err != nil { |
| | | global.GVA_LOG.Error("获取失败!", zap.Error(err)) |
| | | response.FailWithMessage("获取失败", c) |
| | | return |
| | | } |
| | | response.OkWithDetailed(response.PageResult{ |
| | | List: list, |
| | | Total: total, |
| | | Page: params.Page, |
| | | PageSize: params.PageSize, |
| | | }, "获取成功", c) |
| | | } |