From 7144c4cb9615ca3d60e12c6286271353b1c8b29d Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期五, 24 十一月 2023 16:44:43 +0800 Subject: [PATCH] 查询指定操作详情修改 --- controllers/operation.go | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/controllers/operation.go b/controllers/operation.go index aafdf87..a83dd97 100644 --- a/controllers/operation.go +++ b/controllers/operation.go @@ -177,17 +177,18 @@ // @Summary 鍏ュ簱/鍑哄簱鍒楄〃 // @Produce application/json // -// @Param number path string true "鍗曞彿" +// @Param id path string true "id" // // @Success 200 {object} util.Response "鎴愬姛" -// @Router /api-wms/v1/operation/getOperationInfo/{number} [post] +// @Router /api-wms/v1/operation/getOperationInfo/{id} [get] func (slf OperationController) GetOperationInfo(c *gin.Context) { - number := c.Param("number") + number := c.Param("id") if number == "" { util.ResponseFormat(c, code.RequestParamError, "鍙傛暟瑙f瀽澶辫触锛屽弬鏁颁笉鑳戒负绌�") return } - operation, err := models.NewOperationSearch().SetNumber(number).SetPreload(true).First() + id, _ := strconv.Atoi(number) + operation, err := models.NewOperationSearch().SetID(id).SetPreload(true).First() if err != nil { util.ResponseFormat(c, code.RequestParamError, err.Error()) return -- Gitblit v1.8.0