From e338de93e52c51d42606e5413cd768a4324f12f7 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期三, 02 八月 2023 19:39:39 +0800 Subject: [PATCH] fix --- api/v1/followRecord.go | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/api/v1/followRecord.go b/api/v1/followRecord.go index e6c2f4c..239d715 100644 --- a/api/v1/followRecord.go +++ b/api/v1/followRecord.go @@ -7,7 +7,6 @@ "aps_crm/pkg/contextx" "aps_crm/pkg/ecode" "github.com/gin-gonic/gin" - "strconv" "time" ) @@ -48,17 +47,17 @@ // @Tags FollowRecord // @Summary 鍒犻櫎璺熻繘璁板綍 // @Produce application/json -// @Param id path string true "璺熻繘璁板綍id" +// @Param object body request.DeleteFollowRecord true "鏌ヨ鍙傛暟" // @Success 200 {object} contextx.Response{} -// @Router /api/followRecord/delete/{id} [delete] +// @Router /api/followRecord/delete [delete] func (fr *FollowRecordApi) Delete(c *gin.Context) { - ctx, ok := contextx.NewContext(c, nil) + var params request.DeleteFollowRecord + ctx, ok := contextx.NewContext(c, ¶ms) if !ok { return } - id, _ := strconv.Atoi(c.Param("id")) - errCode := followRecordService.DeleteFollowRecord(id) + errCode := followRecordService.DeleteFollowRecord(params.Ids) if errCode != ecode.OK { ctx.Fail(errCode) return @@ -221,4 +220,4 @@ List: followRecords, Count: int(total), }) -} \ No newline at end of file +} -- Gitblit v1.8.0