From 4eb798070f2926d976d0f28b64c36da805890ee6 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期三, 19 七月 2023 18:31:40 +0800
Subject: [PATCH] fix

---
 api/v1/salesReturn.go |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/api/v1/salesReturn.go b/api/v1/salesReturn.go
index bcc4692..f3f4dd2 100644
--- a/api/v1/salesReturn.go
+++ b/api/v1/salesReturn.go
@@ -87,6 +87,8 @@
 		return
 	}
 
+	salesReturn.Id = params.Id
+
 	errCode = salesReturnService.UpdateSalesReturn(&salesReturn)
 	if errCode != ecode.OK {
 		ctx.Fail(errCode)
@@ -102,7 +104,7 @@
 //	@Tags		SalesReturn
 //	@Summary	鑾峰彇閿�鍞��璐у垪琛�
 //	@Produce	application/json
-//	@Success	200	{object}	contextx.Response{}
+//	@Success	200	{object}	contextx.Response{data=response.SalesReturnResponse}
 //	@Router		/api/salesReturn/list [get]
 func (s *SalesReturnApi) List(c *gin.Context) {
 	ctx, ok := contextx.NewContext(c, nil)
@@ -122,17 +124,17 @@
 }
 
 func checkSalesReturnParams(salesReturn request.SalesReturn) (errCode int, s model.SalesReturn) {
-	if salesReturn.Number == "" {
-		return ecode.InvalidParams, s
-	}
-
-	if salesReturn.Repository == "" {
-		return ecode.InvalidParams, s
-	}
-
-	if salesReturn.MemberId == 0 {
-		return ecode.InvalidParams, s
-	}
+	//if salesReturn.Number == "" {
+	//	return ecode.InvalidParams, s
+	//}
+	//
+	//if salesReturn.Repository == "" {
+	//	return ecode.InvalidParams, s
+	//}
+	//
+	//if salesReturn.MemberId == 0 {
+	//	return ecode.InvalidParams, s
+	//}
 
 	t, err := checkTimeFormat(salesReturn.ReturnDate)
 	if err != nil {

--
Gitblit v1.8.0