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/serviceFollowup.go | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-) diff --git a/api/v1/serviceFollowup.go b/api/v1/serviceFollowup.go index dd6009b..34b4f0b 100644 --- a/api/v1/serviceFollowup.go +++ b/api/v1/serviceFollowup.go @@ -7,7 +7,6 @@ "aps_crm/pkg/contextx" "aps_crm/pkg/ecode" "github.com/gin-gonic/gin" - "strconv" ) type ServiceFollowupApi struct{} @@ -47,17 +46,17 @@ // @Tags ServiceFollowup // @Summary 鍒犻櫎鏈嶅姟璺熻繘 // @Produce application/json -// @Param id path int true "鏌ヨ鍙傛暟" +// @Param object body request.DeleteServiceFollowup true "鏌ヨ鍙傛暟" // @Success 200 {object} contextx.Response{} -// @Router /api/serviceFollowup/delete/{id} [delete] +// @Router /api/serviceFollowup/delete [delete] func (s *ServiceFollowupApi) Delete(c *gin.Context) { - ctx, ok := contextx.NewContext(c, nil) + var params request.DeleteServiceFollowup + ctx, ok := contextx.NewContext(c, ¶ms) if !ok { return } - id, _ := strconv.Atoi(c.Param("id")) - errCode := serviceFollowupService.DeleteServiceFollowup(id) + errCode := serviceFollowupService.DeleteServiceFollowup(params.Ids) if errCode != ecode.OK { ctx.Fail(errCode) return @@ -97,7 +96,6 @@ ctx.Ok() } - // checkServiceFollowupParams func checkServiceFollowupParams(serviceFollowup request.ServiceFollowup) (errCode int, serviceFollowupModel model.ServiceFollowup) { @@ -150,7 +148,7 @@ } ctx.OkWithDetailed(response.ServiceFollowupResponse{ - List: serviceFollowups, + List: serviceFollowups, Count: int(total), }) -} \ No newline at end of file +} -- Gitblit v1.8.0