From ee20ffe2a2d1494af0a1285440605d67a5846da6 Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期四, 21 九月 2023 09:34:50 +0800
Subject: [PATCH] 1.出入库一部分代码

---
 controllers/operation.go |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/controllers/operation.go b/controllers/operation.go
index 1c25adc..97ba0fd 100644
--- a/controllers/operation.go
+++ b/controllers/operation.go
@@ -112,7 +112,7 @@
 	//妫�鏌ユ槑缁嗛儴鍒�
 	for _, v := range params.Details {
 		if v.ProductId == "" {
-			return errors.New("productID涓�0")
+			return errors.New("productID涓虹┖")
 		}
 		if v.ProductName == "" {
 			return errors.New("浜у搧鍚嶇О寮傚父")
@@ -172,7 +172,7 @@
 // @Param     object  body request.UpdateOperation true  "鍏ュ簱淇℃伅"
 // @Param     id  path int true  "鍏ュ簱淇℃伅id"
 // @Success   200 {object} util.Response "鎴愬姛"
-// @Router    /api-wms/v1/operation/operation/{id} [put]
+// @Router    /api-wms/v1/operation/operation/{id} [post]
 func (slf OperationController) Update(c *gin.Context) {
 	id := cast.ToUint(c.Param("id"))
 	if id == 0 {
@@ -201,6 +201,11 @@
 		util.ResponseFormat(c, code.RequestParamError, err.Error())
 		return
 	}
+	fmt.Printf("%+v\n", *reqParams.Details[0])
+	fmt.Printf("%+v\n", *reqParams.Details[1])
+	fmt.Println("===============================================")
+	fmt.Printf("%+v\n", *params.Details[0])
+	fmt.Printf("%+v\n", *params.Details[1])
 	if err := models.WithTransaction(func(tx *gorm.DB) error {
 		if err := models.NewOperationDetailsSearch().SetOrm(tx).SetOperationId(params.Id).Delete(); err != nil {
 			return err

--
Gitblit v1.8.0