From c5a0eb549cba2cd358a2d0496c44f3a289f15d9c Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期一, 28 八月 2023 14:22:06 +0800 Subject: [PATCH] fix --- api/v1/serviceFollowup.go | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/api/v1/serviceFollowup.go b/api/v1/serviceFollowup.go index 8819528..ea4f641 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 @@ -112,7 +111,7 @@ ClientId: serviceFollowup.ClientId, Number: serviceFollowup.Number, ContactId: serviceFollowup.ContactId, - ServiceId: serviceFollowup.ServiceId, + ServiceOrderId: serviceFollowup.ServiceOrderId, MemberId: serviceFollowup.MemberId, PlanId: serviceFollowup.PlanId, SatisfactionId: serviceFollowup.Satisfaction, @@ -133,7 +132,9 @@ // @Summary 鍥炶鍗曠鐞嗗垪琛� // @Produce application/json // @Param object body request.GetServiceFollowupList true "鍙傛暟" -// @Success 200 {object} contextx.Response{data=response.ServiceFollowupResponse} +// +// @Success 200 {object} contextx.Response{data=response.ServiceFollowupResponse} +// // @Router /api/serviceFollowup/list [post] func (con *ServiceFollowupApi) List(c *gin.Context) { var params request.GetServiceFollowupList @@ -142,7 +143,7 @@ return } - serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword) + serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword, params.ServiceOrderId) if errCode != ecode.OK { ctx.Fail(errCode) return -- Gitblit v1.8.0