From 0409a5d0235f4a87ecf08b12baa9149279a90447 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期五, 18 八月 2023 22:25:58 +0800
Subject: [PATCH] fix
---
api/v1/serviceContract.go | 43 +++++++++++++++++++++++++++++++++----------
1 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/api/v1/serviceContract.go b/api/v1/serviceContract.go
index 7cf4b9d..012aa4b 100644
--- a/api/v1/serviceContract.go
+++ b/api/v1/serviceContract.go
@@ -42,22 +42,45 @@
ctx.Ok()
}
-// Delete
+//// Delete
+////
+//// @Tags ServiceContract
+//// @Summary 鍒犻櫎鏈嶅姟鍚堝悓
+//// @Produce application/json
+//// @Param object body request.DeleteServiceContract true "鏌ヨ鍙傛暟"
+//// @Success 200 {object} contextx.Response{}
+//// @Router /api/serviceContract/delete [delete]
+//func (s *ServiceContractApi) Delete(c *gin.Context) {
+// var params request.DeleteServiceContract
+// ctx, ok := contextx.NewContext(c, ¶ms)
+// if !ok {
+// return
+// }
//
-// @Tags ServiceContract
-// @Summary 鍒犻櫎鏈嶅姟鍚堝悓
-// @Produce application/json
-// @Param object body request.DeleteServiceContract true "鏌ヨ鍙傛暟"
-// @Success 200 {object} contextx.Response{}
-// @Router /api/serviceContract/delete [delete]
-func (s *ServiceContractApi) Delete(c *gin.Context) {
- var params request.DeleteServiceContract
+// errCode := serviceContractService.DeleteServiceContract(params.Ids)
+// if errCode != ecode.OK {
+// ctx.Fail(errCode)
+// return
+// }
+//
+// ctx.Ok()
+//}
+
+// BatchDelete
+// @Tags ServiceContract
+// @Summary 鎵归噺鍒犻櫎鏈嶅姟鍚堝悓
+// @Produce application/json
+// @Param object body request.CommonIds true "鍙傛暟"
+// @Success 200 {object} contextx.Response{}
+// @Router /api/serviceContract/delete [delete]
+func (s *ServiceContractApi) BatchDelete(c *gin.Context) {
+ var params request.CommonIds
ctx, ok := contextx.NewContext(c, ¶ms)
if !ok {
return
}
- errCode := serviceContractService.DeleteServiceContract(params.Ids)
+ errCode := serviceContractService.BatchDeleteServiceContract(params.Ids)
if errCode != ecode.OK {
ctx.Fail(errCode)
return
--
Gitblit v1.8.0