From b90ad3946fdf84ccf9ad4d5d2e493e0e6c00b96a Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 03 八月 2023 11:47:16 +0800
Subject: [PATCH] fix

---
 api/v1/serviceContract.go |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/api/v1/serviceContract.go b/api/v1/serviceContract.go
index 8cb3e92..aa3175e 100644
--- a/api/v1/serviceContract.go
+++ b/api/v1/serviceContract.go
@@ -7,7 +7,6 @@
 	"aps_crm/pkg/contextx"
 	"aps_crm/pkg/ecode"
 	"github.com/gin-gonic/gin"
-	"strconv"
 )
 
 type ServiceContractApi struct{}
@@ -47,17 +46,17 @@
 //	@Tags		ServiceContract
 //	@Summary	鍒犻櫎鏈嶅姟鍚堝悓
 //	@Produce	application/json
-//	@Param		id	path		int	true	"鏌ヨ鍙傛暟"
+//	@Param		object	body		request.DeleteserviceContract true	"鏌ヨ鍙傛暟"
 //	@Success	200	{object}	contextx.Response{}
-//	@Router		/api/serviceContract/delete/{id} [delete]
+//	@Router		/api/serviceContract/delete [delete]
 func (s *ServiceContractApi) Delete(c *gin.Context) {
-	ctx, ok := contextx.NewContext(c, nil)
+	var params request.DeleteserviceContract
+	ctx, ok := contextx.NewContext(c, &params)
 	if !ok {
 		return
 	}
 
-	id, _ := strconv.Atoi(c.Param("id"))
-	errCode := serviceContractService.DeleteServiceContract(id)
+	errCode := serviceContractService.DeleteServiceContract(params.Ids)
 	if errCode != ecode.OK {
 		ctx.Fail(errCode)
 		return
@@ -174,4 +173,4 @@
 		List:  serviceContracts,
 		Count: int(total),
 	})
-}
\ No newline at end of file
+}

--
Gitblit v1.8.0