From c6d19b35b74d020b3ca28d33101d8f1695e39945 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期五, 21 七月 2023 13:49:25 +0800
Subject: [PATCH] ignore

---
 api/v1/serviceFollowup.go |   46 ++++++++++++++++++++++++----------------------
 1 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/api/v1/serviceFollowup.go b/api/v1/serviceFollowup.go
index 65f8f53..9e97657 100644
--- a/api/v1/serviceFollowup.go
+++ b/api/v1/serviceFollowup.go
@@ -71,8 +71,8 @@
 //	@Tags		ServiceFollowup
 //	@Summary	鏇存柊鏈嶅姟璺熻繘
 //	@Produce	application/json
-//	@Param		object	body		request.UpdateServiceFollowup true	"鏌ヨ鍙傛暟"
-//	@Success	200	{object}	contextx.Response{}
+//	@Param		object	body		request.UpdateServiceFollowup	true	"鏌ヨ鍙傛暟"
+//	@Success	200		{object}	contextx.Response{}
 //	@Router		/api/serviceFollowup/update [put]
 func (s *ServiceFollowupApi) Update(c *gin.Context) {
 	var params request.UpdateServiceFollowup
@@ -86,6 +86,8 @@
 		ctx.Fail(errCode)
 		return
 	}
+
+	serviceFollowup.Id = params.Id
 
 	errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup)
 	if errCode != ecode.OK {
@@ -122,28 +124,28 @@
 
 // checkServiceFollowupParams
 func checkServiceFollowupParams(serviceFollowup request.ServiceFollowup) (errCode int, serviceFollowupModel model.ServiceFollowup) {
-	if serviceFollowup.Number == "" {
-		return ecode.InvalidParams, serviceFollowupModel
-	}
-
-	if serviceFollowup.MemberId == 0 {
-		return ecode.InvalidParams, serviceFollowupModel
-	}
+	//if serviceFollowup.Number == "" {
+	//	return ecode.InvalidParams, serviceFollowupModel
+	//}
+	//
+	//if serviceFollowup.MemberId == 0 {
+	//	return ecode.InvalidParams, serviceFollowupModel
+	//}
 
 	serviceFollowupModel = model.ServiceFollowup{
-		ClientId:     serviceFollowup.ClientId,
-		Number:       serviceFollowup.Number,
-		ContactId:    serviceFollowup.ContactId,
-		ServiceId:    serviceFollowup.ServiceId,
-		MemberId:     serviceFollowup.MemberId,
-		PlanId:       serviceFollowup.PlanId,
-		Satisfaction: serviceFollowup.Satisfaction,
-		TimelyRate:   serviceFollowup.TimelyRate,
-		SolveRate:    serviceFollowup.SolveRate,
-		IsVisit:      serviceFollowup.IsVisit,
-		OldMemberId:  serviceFollowup.OldMemberId,
-		Remark:       serviceFollowup.Remark,
-		File:         serviceFollowup.File,
+		ClientId:       serviceFollowup.ClientId,
+		Number:         serviceFollowup.Number,
+		ContactId:      serviceFollowup.ContactId,
+		ServiceId:      serviceFollowup.ServiceId,
+		MemberId:       serviceFollowup.MemberId,
+		PlanId:         serviceFollowup.PlanId,
+		SatisfactionId: serviceFollowup.Satisfaction,
+		TimelyRateId:   serviceFollowup.TimelyRate,
+		SolveRateId:    serviceFollowup.SolveRate,
+		IsVisitId:      serviceFollowup.IsVisit,
+		OldMemberId:    serviceFollowup.OldMemberId,
+		Remark:         serviceFollowup.Remark,
+		File:           serviceFollowup.File,
 	}
 
 	return ecode.OK, serviceFollowupModel

--
Gitblit v1.8.0