From 7d06c6472f1acea6b2e49e7b8837bf555e94e219 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 07 五月 2024 16:21:06 +0800 Subject: [PATCH] fox --- controllers/workshop_manage_controller.go | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/workshop_manage_controller.go b/controllers/workshop_manage_controller.go index 6c34217..07df3f0 100644 --- a/controllers/workshop_manage_controller.go +++ b/controllers/workshop_manage_controller.go @@ -50,15 +50,15 @@ // @Param Authorization header string true "token" // @Param object query request.GetPriceStandard true "鍙傛暟" // @Success 200 {object} util.ResponseList{data=[]models.WorkshopManage} "鎴愬姛" -// @Router /api-jl/v1/system/getWorkshopManageList [get] +// @Router /api-jl/v1/system/getWorkshopManageList [post] func (slf WorkshopManageController) GetWorkshopManageList(c *gin.Context) { var param request.GetWorkshopManage - err := c.ShouldBindQuery(¶m) + err := c.BindJSON(¶m) if err != nil { util.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屾暟鎹被鍨嬮敊璇�") return } - list, total, err := models.NewWorkshopManageSearch().SetPage(param.Page, param.PageSize).Find() + list, total, err := models.NewWorkshopManageSearch().SetWorkshopName(param.WorkshopName).SetGroupNumber(param.GroupNumber).SetPage(param.Page, param.PageSize).Find() if err != nil { util.ResponseFormat(c, code.SelectError, "鏌ヨ澶辫触") return @@ -172,7 +172,7 @@ util.ResponseFormat(c, code.RequestParamError, "鏌ユ壘澶辫触") return } - fineness, err := models.NewFinenessRegisterSearch().SetWorkshop(params.WorkshopName).SetWorkshopGroup(params.GroupNumber). + fineness, err := models.NewFinenessRegisterSearch().SetWorkshopName(params.WorkshopName).SetWorkshopGroup(params.GroupNumber). SetMarket(params.MarketName).First() if err != nil { if err == gorm.ErrRecordNotFound { -- Gitblit v1.8.0