From 854ef02e9a8b9683d9f7db58bb1023a94654b969 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 16 八月 2023 10:13:45 +0800 Subject: [PATCH] 销售退货单批量删除接口 --- api/v1/salesReturn.go | 31 +++++++++++++++++++++++++++---- 1 files changed, 27 insertions(+), 4 deletions(-) diff --git a/api/v1/salesReturn.go b/api/v1/salesReturn.go index e0c7990..caa7150 100644 --- a/api/v1/salesReturn.go +++ b/api/v1/salesReturn.go @@ -14,7 +14,7 @@ // Add // -// @Tags SalesReturn +// @Tags 閿�鍞��璐у崟 // @Summary 娣诲姞閿�鍞��璐� // @Produce application/json // @Param object body request.AddSalesReturnRequest true "鏌ヨ鍙傛暟" @@ -44,7 +44,7 @@ // Delete // -// @Tags SalesReturn +// @Tags 閿�鍞��璐у崟 // @Summary 鍒犻櫎閿�鍞��璐� // @Produce application/json // @Param id path int true "鏌ヨ鍙傛暟" @@ -66,9 +66,32 @@ ctx.Ok() } +// BatchDelete +// @Tags 閿�鍞��璐у崟 +// @Summary 鎵归噺鍒犻櫎閿�鍞��璐у崟 +// @Produce application/json +// @Param object body request.CommonIds true "鍙傛暟" +// @Success 200 {object} contextx.Response{} +// @Router /api/salesReturn/delete [delete] +func (s *SalesReturnApi) BatchDelete(c *gin.Context) { + var params request.CommonIds + ctx, ok := contextx.NewContext(c, ¶ms) + if !ok { + return + } + + errCode := salesReturnService.BatchDeleteSalesReturn(params.Ids) + if errCode != ecode.OK { + ctx.Fail(errCode) + return + } + + ctx.Ok() +} + // Update // -// @Tags SalesReturn +// @Tags 閿�鍞��璐у崟 // @Summary 鏇存柊閿�鍞��璐� // @Produce application/json // @Param object body request.UpdateSalesReturnRequest true "鏌ヨ鍙傛暟" @@ -126,7 +149,7 @@ // List // -// @Tags SalesReturn +// @Tags 閿�鍞��璐у崟 // @Summary 閿�鍞��璐у崟鍒楄〃 // @Produce application/json // @Param object body request.GetSalesReturnList true "鍙傛暟" -- Gitblit v1.8.0