From d8ac88cfb72e3aac3a89c3cfe77774be3024a24c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 11 八月 2023 17:54:43 +0800
Subject: [PATCH] update

---
 model/serviceOrder.go            |    1 
 model/request/serviceFollowup.go |   78 +++---
 docs/swagger.yaml                |   49 +---
 docs/docs.go                     |   68 +----
 api/v1/serviceFollowup.go        |  308 ++++++++++++++--------------
 docs/swagger.json                |   68 +----
 model/request/serviceOrder.go    |    4 
 model/serviceFollowup.go         |   47 ++--
 8 files changed, 268 insertions(+), 355 deletions(-)

diff --git a/api/v1/serviceFollowup.go b/api/v1/serviceFollowup.go
index f3b5982..3c2dda4 100644
--- a/api/v1/serviceFollowup.go
+++ b/api/v1/serviceFollowup.go
@@ -1,154 +1,154 @@
-package v1
-
-import (
-	"aps_crm/model"
-	"aps_crm/model/request"
-	"aps_crm/model/response"
-	"aps_crm/pkg/contextx"
-	"aps_crm/pkg/ecode"
-	"github.com/gin-gonic/gin"
-)
-
-type ServiceFollowupApi struct{}
-
-// Add
-//
-//	@Tags		ServiceFollowup
-//	@Summary	娣诲姞鏈嶅姟璺熻繘
-//	@Produce	application/json
-//	@Param		object	body		request.AddServiceFollowup	true	"鏌ヨ鍙傛暟"
-//	@Success	200		{object}	contextx.Response{}
-//	@Router		/api/serviceFollowup/add [post]
-func (s *ServiceFollowupApi) Add(c *gin.Context) {
-	var params request.AddServiceFollowup
-	ctx, ok := contextx.NewContext(c, &params)
-	if !ok {
-		return
-	}
-
-	errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup)
-	if errCode != ecode.OK {
-		ctx.Fail(errCode)
-		return
-	}
-
-	errCode = serviceFollowupService.AddServiceFollowup(&serviceFollowup)
-	if errCode != ecode.OK {
-		ctx.Fail(errCode)
-		return
-	}
-
-	ctx.Ok()
-}
-
-// Delete
-//
-//	@Tags		ServiceFollowup
-//	@Summary	鍒犻櫎鏈嶅姟璺熻繘
-//	@Produce	application/json
-//	@Param		object	body		request.DeleteServiceFollowup true	"鏌ヨ鍙傛暟"
-//	@Success	200	{object}	contextx.Response{}
-//	@Router		/api/serviceFollowup/delete [delete]
-func (s *ServiceFollowupApi) Delete(c *gin.Context) {
-	var params request.DeleteServiceFollowup
-	ctx, ok := contextx.NewContext(c, &params)
-	if !ok {
-		return
-	}
-
-	errCode := serviceFollowupService.DeleteServiceFollowup(params.Ids)
-	if errCode != ecode.OK {
-		ctx.Fail(errCode)
-		return
-	}
-
-	ctx.Ok()
-}
-
-// Update
-//
-//	@Tags		ServiceFollowup
-//	@Summary	鏇存柊鏈嶅姟璺熻繘
-//	@Produce	application/json
-//	@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
-	ctx, ok := contextx.NewContext(c, &params)
-	if !ok {
-		return
-	}
-
-	errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup)
-	if errCode != ecode.OK {
-		ctx.Fail(errCode)
-		return
-	}
-
-	serviceFollowup.Id = params.Id
-
-	errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup)
-	if errCode != ecode.OK {
-		ctx.Fail(errCode)
-		return
-	}
-
-	ctx.Ok()
-}
-
-// 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
-	//}
-
-	serviceFollowupModel = model.ServiceFollowup{
-		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
-}
-
-// List
-//
-//	@Tags		ServiceFollowup
-//	@Summary	鍥炶鍗曠鐞嗗垪琛�
-//	@Produce	application/json
-//	@Param		object	body		request.GetServiceFollowupList	true	"鍙傛暟"
-//	@Success	200		{object}	contextx.Response{data=response.ServiceFollowupResponse}
-//	@Router		/api/serviceFollowup/list [post]
-func (con *ServiceFollowupApi) List(c *gin.Context) {
-	var params request.GetServiceFollowupList
-	ctx, ok := contextx.NewContext(c, &params)
-	if !ok {
-		return
-	}
-
-	serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword, params.ServiceOrderId)
-	if errCode != ecode.OK {
-		ctx.Fail(errCode)
-		return
-	}
-
-	ctx.OkWithDetailed(response.ServiceFollowupResponse{
-		List:  serviceFollowups,
-		Count: int(total),
-	})
-}
+package v1
+
+import (
+	"aps_crm/model"
+	"aps_crm/model/request"
+	"aps_crm/model/response"
+	"aps_crm/pkg/contextx"
+	"aps_crm/pkg/ecode"
+	"github.com/gin-gonic/gin"
+)
+
+type ServiceFollowupApi struct{}
+
+// Add
+//
+//	@Tags		ServiceFollowup
+//	@Summary	娣诲姞鏈嶅姟璺熻繘
+//	@Produce	application/json
+//	@Param		object	body		request.AddServiceFollowup	true	"鏌ヨ鍙傛暟"
+//	@Success	200		{object}	contextx.Response{}
+//	@Router		/api/serviceFollowup/add [post]
+func (s *ServiceFollowupApi) Add(c *gin.Context) {
+	var params request.AddServiceFollowup
+	ctx, ok := contextx.NewContext(c, &params)
+	if !ok {
+		return
+	}
+
+	errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	errCode = serviceFollowupService.AddServiceFollowup(&serviceFollowup)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	ctx.Ok()
+}
+
+// Delete
+//
+//	@Tags		ServiceFollowup
+//	@Summary	鍒犻櫎鏈嶅姟璺熻繘
+//	@Produce	application/json
+//	@Param		object	body		request.DeleteServiceFollowup true	"鏌ヨ鍙傛暟"
+//	@Success	200	{object}	contextx.Response{}
+//	@Router		/api/serviceFollowup/delete [delete]
+func (s *ServiceFollowupApi) Delete(c *gin.Context) {
+	var params request.DeleteServiceFollowup
+	ctx, ok := contextx.NewContext(c, &params)
+	if !ok {
+		return
+	}
+
+	errCode := serviceFollowupService.DeleteServiceFollowup(params.Ids)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	ctx.Ok()
+}
+
+// Update
+//
+//	@Tags		ServiceFollowup
+//	@Summary	鏇存柊鏈嶅姟璺熻繘
+//	@Produce	application/json
+//	@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
+	ctx, ok := contextx.NewContext(c, &params)
+	if !ok {
+		return
+	}
+
+	errCode, serviceFollowup := checkServiceFollowupParams(params.ServiceFollowup)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	serviceFollowup.Id = params.Id
+
+	errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	ctx.Ok()
+}
+
+// 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
+	//}
+
+	serviceFollowupModel = model.ServiceFollowup{
+		ClientId:       serviceFollowup.ClientId,
+		Number:         serviceFollowup.Number,
+		ContactId:      serviceFollowup.ContactId,
+		ServiceOrderId: serviceFollowup.ServiceOrderId,
+		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
+}
+
+// List
+//
+//	@Tags		ServiceFollowup
+//	@Summary	鍥炶鍗曠鐞嗗垪琛�
+//	@Produce	application/json
+//	@Param		object	body		request.GetServiceFollowupList	true	"鍙傛暟"
+//	@Success	200		{object}	contextx.Response{data=response.ServiceFollowupResponse}
+//	@Router		/api/serviceFollowup/list [post]
+func (con *ServiceFollowupApi) List(c *gin.Context) {
+	var params request.GetServiceFollowupList
+	ctx, ok := contextx.NewContext(c, &params)
+	if !ok {
+		return
+	}
+
+	serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword, params.ServiceOrderId)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	ctx.OkWithDetailed(response.ServiceFollowupResponse{
+		List:  serviceFollowups,
+		Count: int(total),
+	})
+}
diff --git a/docs/docs.go b/docs/docs.go
index 373da68..414e949 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -10865,32 +10865,6 @@
                 }
             }
         },
-        "model.CustomerServiceSheet": {
-            "type": "object",
-            "properties": {
-                "handleStatus": {
-                    "type": "integer"
-                },
-                "id": {
-                    "type": "integer"
-                },
-                "memberId": {
-                    "type": "integer"
-                },
-                "number": {
-                    "type": "string"
-                },
-                "priority": {
-                    "type": "integer"
-                },
-                "serviceFollowupId": {
-                    "type": "integer"
-                },
-                "serviceMode": {
-                    "type": "integer"
-                }
-            }
-        },
         "model.Department": {
             "type": "object",
             "properties": {
@@ -12174,9 +12148,6 @@
                 "contactId": {
                     "type": "integer"
                 },
-                "customerServiceSheet": {
-                    "$ref": "#/definitions/model.CustomerServiceSheet"
-                },
                 "file": {
                     "type": "string"
                 },
@@ -12286,9 +12257,6 @@
                 },
                 "id": {
                     "type": "integer"
-                },
-                "orderManage": {
-                    "$ref": "#/definitions/model.OrderManage"
                 },
                 "priorityLevel": {
                     "$ref": "#/definitions/model.PriorityLevel"
@@ -13907,7 +13875,7 @@
                 "satisfaction": {
                     "type": "integer"
                 },
-                "serviceId": {
+                "serviceOrderId": {
                     "type": "integer"
                 },
                 "solveRate": {
@@ -13945,10 +13913,6 @@
                     "description": "鑱旂郴浜篿d",
                     "type": "integer"
                 },
-                "contractId": {
-                    "description": "鍚堝悓id",
-                    "type": "integer"
-                },
                 "expectTime": {
                     "description": "甯屾湜澶勭悊鏃堕棿",
                     "type": "string"
@@ -13959,10 +13923,6 @@
                 },
                 "faultTypeId": {
                     "description": "鏁呴殰绫诲埆id",
-                    "type": "integer"
-                },
-                "orderId": {
-                    "description": "閿�鍞鍗昳d",
                     "type": "integer"
                 },
                 "priorityLevelId": {
@@ -13987,6 +13947,14 @@
                 },
                 "saleChanceId": {
                     "description": "閿�鍞満浼歩d",
+                    "type": "integer"
+                },
+                "salesDetailsId": {
+                    "description": "閿�鍞鍗昳d",
+                    "type": "integer"
+                },
+                "serviceContractId": {
+                    "description": "鍚堝悓id",
                     "type": "integer"
                 },
                 "serviceManId": {
@@ -17060,7 +17028,7 @@
                 "satisfaction": {
                     "type": "integer"
                 },
-                "serviceId": {
+                "serviceOrderId": {
                     "type": "integer"
                 },
                 "solveRate": {
@@ -17098,10 +17066,6 @@
                     "description": "鑱旂郴浜篿d",
                     "type": "integer"
                 },
-                "contractId": {
-                    "description": "鍚堝悓id",
-                    "type": "integer"
-                },
                 "expectTime": {
                     "description": "甯屾湜澶勭悊鏃堕棿",
                     "type": "string"
@@ -17115,10 +17079,6 @@
                     "type": "integer"
                 },
                 "id": {
-                    "type": "integer"
-                },
-                "orderId": {
-                    "description": "閿�鍞鍗昳d",
                     "type": "integer"
                 },
                 "priorityLevelId": {
@@ -17145,6 +17105,14 @@
                     "description": "閿�鍞満浼歩d",
                     "type": "integer"
                 },
+                "salesDetailsId": {
+                    "description": "閿�鍞鍗昳d",
+                    "type": "integer"
+                },
+                "serviceContractId": {
+                    "description": "鍚堝悓id",
+                    "type": "integer"
+                },
                 "serviceManId": {
                     "description": "鏈嶅姟浜哄憳",
                     "type": "integer"
diff --git a/docs/swagger.json b/docs/swagger.json
index 2f50976..26776dd 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -10853,32 +10853,6 @@
                 }
             }
         },
-        "model.CustomerServiceSheet": {
-            "type": "object",
-            "properties": {
-                "handleStatus": {
-                    "type": "integer"
-                },
-                "id": {
-                    "type": "integer"
-                },
-                "memberId": {
-                    "type": "integer"
-                },
-                "number": {
-                    "type": "string"
-                },
-                "priority": {
-                    "type": "integer"
-                },
-                "serviceFollowupId": {
-                    "type": "integer"
-                },
-                "serviceMode": {
-                    "type": "integer"
-                }
-            }
-        },
         "model.Department": {
             "type": "object",
             "properties": {
@@ -12162,9 +12136,6 @@
                 "contactId": {
                     "type": "integer"
                 },
-                "customerServiceSheet": {
-                    "$ref": "#/definitions/model.CustomerServiceSheet"
-                },
                 "file": {
                     "type": "string"
                 },
@@ -12274,9 +12245,6 @@
                 },
                 "id": {
                     "type": "integer"
-                },
-                "orderManage": {
-                    "$ref": "#/definitions/model.OrderManage"
                 },
                 "priorityLevel": {
                     "$ref": "#/definitions/model.PriorityLevel"
@@ -13895,7 +13863,7 @@
                 "satisfaction": {
                     "type": "integer"
                 },
-                "serviceId": {
+                "serviceOrderId": {
                     "type": "integer"
                 },
                 "solveRate": {
@@ -13933,10 +13901,6 @@
                     "description": "鑱旂郴浜篿d",
                     "type": "integer"
                 },
-                "contractId": {
-                    "description": "鍚堝悓id",
-                    "type": "integer"
-                },
                 "expectTime": {
                     "description": "甯屾湜澶勭悊鏃堕棿",
                     "type": "string"
@@ -13947,10 +13911,6 @@
                 },
                 "faultTypeId": {
                     "description": "鏁呴殰绫诲埆id",
-                    "type": "integer"
-                },
-                "orderId": {
-                    "description": "閿�鍞鍗昳d",
                     "type": "integer"
                 },
                 "priorityLevelId": {
@@ -13975,6 +13935,14 @@
                 },
                 "saleChanceId": {
                     "description": "閿�鍞満浼歩d",
+                    "type": "integer"
+                },
+                "salesDetailsId": {
+                    "description": "閿�鍞鍗昳d",
+                    "type": "integer"
+                },
+                "serviceContractId": {
+                    "description": "鍚堝悓id",
                     "type": "integer"
                 },
                 "serviceManId": {
@@ -17048,7 +17016,7 @@
                 "satisfaction": {
                     "type": "integer"
                 },
-                "serviceId": {
+                "serviceOrderId": {
                     "type": "integer"
                 },
                 "solveRate": {
@@ -17086,10 +17054,6 @@
                     "description": "鑱旂郴浜篿d",
                     "type": "integer"
                 },
-                "contractId": {
-                    "description": "鍚堝悓id",
-                    "type": "integer"
-                },
                 "expectTime": {
                     "description": "甯屾湜澶勭悊鏃堕棿",
                     "type": "string"
@@ -17103,10 +17067,6 @@
                     "type": "integer"
                 },
                 "id": {
-                    "type": "integer"
-                },
-                "orderId": {
-                    "description": "閿�鍞鍗昳d",
                     "type": "integer"
                 },
                 "priorityLevelId": {
@@ -17133,6 +17093,14 @@
                     "description": "閿�鍞満浼歩d",
                     "type": "integer"
                 },
+                "salesDetailsId": {
+                    "description": "閿�鍞鍗昳d",
+                    "type": "integer"
+                },
+                "serviceContractId": {
+                    "description": "鍚堝悓id",
+                    "type": "integer"
+                },
                 "serviceManId": {
                     "description": "鏈嶅姟浜哄憳",
                     "type": "integer"
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 73ca838..65383ab 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -633,23 +633,6 @@
       name:
         type: string
     type: object
-  model.CustomerServiceSheet:
-    properties:
-      handleStatus:
-        type: integer
-      id:
-        type: integer
-      memberId:
-        type: integer
-      number:
-        type: string
-      priority:
-        type: integer
-      serviceFollowupId:
-        type: integer
-      serviceMode:
-        type: integer
-    type: object
   model.Department:
     properties:
       id:
@@ -1501,8 +1484,6 @@
         $ref: '#/definitions/model.Contact'
       contactId:
         type: integer
-      customerServiceSheet:
-        $ref: '#/definitions/model.CustomerServiceSheet'
       file:
         type: string
       id:
@@ -1581,8 +1562,6 @@
         type: integer
       id:
         type: integer
-      orderManage:
-        $ref: '#/definitions/model.OrderManage'
       priorityLevel:
         $ref: '#/definitions/model.PriorityLevel'
       priorityLevelId:
@@ -2675,7 +2654,7 @@
         type: string
       satisfaction:
         type: integer
-      serviceId:
+      serviceOrderId:
         type: integer
       solveRate:
         type: integer
@@ -2702,9 +2681,6 @@
       contactId:
         description: 鑱旂郴浜篿d
         type: integer
-      contractId:
-        description: 鍚堝悓id
-        type: integer
       expectTime:
         description: 甯屾湜澶勭悊鏃堕棿
         type: string
@@ -2713,9 +2689,6 @@
         type: integer
       faultTypeId:
         description: 鏁呴殰绫诲埆id
-        type: integer
-      orderId:
-        description: 閿�鍞鍗昳d
         type: integer
       priorityLevelId:
         description: 浼樺厛绾у埆id
@@ -2734,6 +2707,12 @@
         type: string
       saleChanceId:
         description: 閿�鍞満浼歩d
+        type: integer
+      salesDetailsId:
+        description: 閿�鍞鍗昳d
+        type: integer
+      serviceContractId:
+        description: 鍚堝悓id
         type: integer
       serviceManId:
         description: 鏈嶅姟浜哄憳
@@ -4828,7 +4807,7 @@
         type: string
       satisfaction:
         type: integer
-      serviceId:
+      serviceOrderId:
         type: integer
       solveRate:
         type: integer
@@ -4855,9 +4834,6 @@
       contactId:
         description: 鑱旂郴浜篿d
         type: integer
-      contractId:
-        description: 鍚堝悓id
-        type: integer
       expectTime:
         description: 甯屾湜澶勭悊鏃堕棿
         type: string
@@ -4868,9 +4844,6 @@
         description: 鏁呴殰绫诲埆id
         type: integer
       id:
-        type: integer
-      orderId:
-        description: 閿�鍞鍗昳d
         type: integer
       priorityLevelId:
         description: 浼樺厛绾у埆id
@@ -4890,6 +4863,12 @@
       saleChanceId:
         description: 閿�鍞満浼歩d
         type: integer
+      salesDetailsId:
+        description: 閿�鍞鍗昳d
+        type: integer
+      serviceContractId:
+        description: 鍚堝悓id
+        type: integer
       serviceManId:
         description: 鏈嶅姟浜哄憳
         type: integer
diff --git a/model/request/serviceFollowup.go b/model/request/serviceFollowup.go
index 72f2891..cd45528 100644
--- a/model/request/serviceFollowup.go
+++ b/model/request/serviceFollowup.go
@@ -1,39 +1,39 @@
-package request
-
-import "aps_crm/constvar"
-
-type AddServiceFollowup struct {
-	ServiceFollowup
-}
-
-type ServiceFollowup struct {
-	ClientId     int    `json:"clientId"`
-	Number       string `json:"number"`
-	ContactId    int    `json:"contactId"`
-	ServiceId    int    `json:"serviceId"`
-	MemberId     int    `json:"memberId"`
-	PlanId       int    `json:"planId"`
-	Satisfaction int    `json:"satisfaction"`
-	TimelyRate   int    `json:"timelyRate"`
-	SolveRate    int    `json:"solveRate"`
-	IsVisit      int    `json:"isVisit"`
-	OldMemberId  int    `json:"oldMemberId"`
-	Remark       string `json:"remark"`
-	File         string `json:"file"`
-}
-
-type UpdateServiceFollowup struct {
-	Id int `json:"id"`
-	ServiceFollowup
-}
-
-type GetServiceFollowupList struct {
-	PageInfo
-	KeywordType    constvar.ServiceFollowupKeywordType `json:"keywordType"`
-	Keyword        string                              `json:"keyword"`
-	ServiceOrderId int                                 `json:"serviceOrderId"` //鏈嶅姟鍥炶鍗昳d
-}
-
-type DeleteServiceFollowup struct {
-	Ids []int `json:"ids"`
-}
+package request
+
+import "aps_crm/constvar"
+
+type AddServiceFollowup struct {
+	ServiceFollowup
+}
+
+type ServiceFollowup struct {
+	ClientId       int    `json:"clientId"`
+	Number         string `json:"number"`
+	ContactId      int    `json:"contactId"`
+	ServiceOrderId int    `json:"serviceOrderId"`
+	MemberId       int    `json:"memberId"`
+	PlanId         int    `json:"planId"`
+	Satisfaction   int    `json:"satisfaction"`
+	TimelyRate     int    `json:"timelyRate"`
+	SolveRate      int    `json:"solveRate"`
+	IsVisit        int    `json:"isVisit"`
+	OldMemberId    int    `json:"oldMemberId"`
+	Remark         string `json:"remark"`
+	File           string `json:"file"`
+}
+
+type UpdateServiceFollowup struct {
+	Id int `json:"id"`
+	ServiceFollowup
+}
+
+type GetServiceFollowupList struct {
+	PageInfo
+	KeywordType    constvar.ServiceFollowupKeywordType `json:"keywordType"`
+	Keyword        string                              `json:"keyword"`
+	ServiceOrderId int                                 `json:"serviceOrderId"` //鏈嶅姟鍥炶鍗昳d
+}
+
+type DeleteServiceFollowup struct {
+	Ids []int `json:"ids"`
+}
diff --git a/model/request/serviceOrder.go b/model/request/serviceOrder.go
index 7312c61..244373b 100644
--- a/model/request/serviceOrder.go
+++ b/model/request/serviceOrder.go
@@ -7,8 +7,8 @@
 type AddServiceOrder struct {
 	ServiceNumber        string  `gorm:"service_number" json:"serviceNumber"`                                                                    // 鏈嶅姟鍗曠紪鍙�
 	ClientId             int     `gorm:"client_id" json:"clientId"`                                                                              // 瀹㈡埛id
-	ContractId           int     `gorm:"contract_id" json:"contractId"`                                                                          // 鍚堝悓id
-	OrderId              int     `gorm:"order_id" json:"orderId"`                                                                                // 閿�鍞鍗昳d
+	ServiceContractId    int     `gorm:"service_contract_id" json:"serviceContractId"`                                                           // 鍚堝悓id
+	SalesDetailsId       int     `gorm:"sales_details_id" json:"salesDetailsId"`                                                                 // 閿�鍞鍗昳d
 	Subject              string  `gorm:"subject" json:"subject"`                                                                                 // 涓婚
 	ProductId            int     `gorm:"product_id" json:"productId"`                                                                            // 浜у搧id
 	ServiceTypeId        int     `gorm:"service_type_id" json:"serviceTypeId"`                                                                   // 鏈嶅姟鏂瑰紡id
diff --git a/model/serviceFollowup.go b/model/serviceFollowup.go
index 787c48e..004bfc3 100644
--- a/model/serviceFollowup.go
+++ b/model/serviceFollowup.go
@@ -10,30 +10,29 @@
 
 type (
 	ServiceFollowup struct {
-		Id                   int                  `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
-		ClientId             int                  `json:"clientId" gorm:"column:client_id;type:int;comment:瀹㈡埛id"`
-		Client               Client               `json:"client" gorm:"foreignKey:ClientId"`
-		Number               string               `json:"number" gorm:"column:number;type:varchar(255);comment:鍚堝悓缂栧彿"`
-		ContactId            int                  `json:"contactId" gorm:"column:contact_id;type:int;comment:鑱旂郴浜篿d"`
-		Contact              Contact              `json:"contact"  gorm:"foreignKey:ContactId"`
-		ServiceOrderId       int                  `json:"serviceOrderId" gorm:"column:service_order_id;type:int;comment:瀹㈡埛鏈嶅姟鍗昳d"`
-		ServiceOrder         ServiceOrder         `gorm:"foreignKey:ServiceId"`
-		CustomerServiceSheet CustomerServiceSheet `json:"customerServiceSheet" gorm:"foreignKey:ServiceId"`
-		MemberId             int                  `json:"memberId" gorm:"column:member_id;type:int;comment:鏈嶅姟浜哄憳id"`
-		Member               User                 `json:"Member" gorm:"foreignKey:MemberId"`
-		PlanId               int                  `json:"planId" gorm:"column:plan_id;type:int;comment:鏈嶅姟璁″垝id"`
-		SatisfactionId       int                  `json:"satisfactionId" gorm:"column:satisfaction_id;type:int;comment:婊℃剰搴d"`
-		Satisfaction         Satisfaction         `json:"satisfaction" gorm:"foreignKey:SatisfactionId"`
-		TimelyRateId         int                  `json:"timelyRateId" gorm:"column:timely_rate_id;type:int;comment:鍙婃椂鐜噄d"`
-		TimelyRate           TimelyRate           `json:"timelyRate" gorm:"foreignKey:TimelyRateId"`
-		SolveRateId          int                  `json:"solveRateId" gorm:"column:solve_rate_id;type:int;comment:瑙e喅鐜噄d"`
-		SolveRate            SolveRate            `json:"solveRate" gorm:"foreignKey:SolveRateId"`
-		IsVisitId            int                  `json:"isVisitId" gorm:"column:is_visit_id;type:int;comment:鏈嶅姟浜哄憳鏄惁鏉ヨ繃id"`
-		IsVisit              IsVisit              `json:"isVisit"  gorm:"foreignKey:IsVisitId"`
-		OldMemberId          int                  `json:"oldMemberId" gorm:"column:old_member_id;type:int;comment:鍘熸湇鍔′汉鍛�"`
-		OldMember            User                 `json:"oldMember" gorm:"foreignKey:OldMemberId"`
-		Remark               string               `json:"remark" gorm:"column:remark;type:text;comment:澶囨敞"`
-		File                 string               `json:"file" gorm:"column:file;type:varchar(255);comment:闄勪欢"`
+		Id             int          `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"`
+		ClientId       int          `json:"clientId" gorm:"column:client_id;type:int;comment:瀹㈡埛id"`
+		Client         Client       `json:"client" gorm:"foreignKey:ClientId"`
+		Number         string       `json:"number" gorm:"column:number;type:varchar(255);comment:鍚堝悓缂栧彿"`
+		ContactId      int          `json:"contactId" gorm:"column:contact_id;type:int;comment:鑱旂郴浜篿d"`
+		Contact        Contact      `json:"contact"  gorm:"foreignKey:ContactId"`
+		ServiceOrderId int          `json:"serviceOrderId" gorm:"column:service_order_id;type:int;comment:瀹㈡埛鏈嶅姟鍗昳d"`
+		ServiceOrder   ServiceOrder `gorm:"foreignKey:ServiceOrderId"`
+		MemberId       int          `json:"memberId" gorm:"column:member_id;type:int;comment:鏈嶅姟浜哄憳id"`
+		Member         User         `json:"Member" gorm:"foreignKey:MemberId"`
+		PlanId         int          `json:"planId" gorm:"column:plan_id;type:int;comment:鏈嶅姟璁″垝id"`
+		SatisfactionId int          `json:"satisfactionId" gorm:"column:satisfaction_id;type:int;comment:婊℃剰搴d"`
+		Satisfaction   Satisfaction `json:"satisfaction" gorm:"foreignKey:SatisfactionId"`
+		TimelyRateId   int          `json:"timelyRateId" gorm:"column:timely_rate_id;type:int;comment:鍙婃椂鐜噄d"`
+		TimelyRate     TimelyRate   `json:"timelyRate" gorm:"foreignKey:TimelyRateId"`
+		SolveRateId    int          `json:"solveRateId" gorm:"column:solve_rate_id;type:int;comment:瑙e喅鐜噄d"`
+		SolveRate      SolveRate    `json:"solveRate" gorm:"foreignKey:SolveRateId"`
+		IsVisitId      int          `json:"isVisitId" gorm:"column:is_visit_id;type:int;comment:鏈嶅姟浜哄憳鏄惁鏉ヨ繃id"`
+		IsVisit        IsVisit      `json:"isVisit"  gorm:"foreignKey:IsVisitId"`
+		OldMemberId    int          `json:"oldMemberId" gorm:"column:old_member_id;type:int;comment:鍘熸湇鍔′汉鍛�"`
+		OldMember      User         `json:"oldMember" gorm:"foreignKey:OldMemberId"`
+		Remark         string       `json:"remark" gorm:"column:remark;type:text;comment:澶囨敞"`
+		File           string       `json:"file" gorm:"column:file;type:varchar(255);comment:闄勪欢"`
 
 		gorm.Model `json:"-"`
 	}
diff --git a/model/serviceOrder.go b/model/serviceOrder.go
index e249844..21cd7f1 100644
--- a/model/serviceOrder.go
+++ b/model/serviceOrder.go
@@ -21,7 +21,6 @@
 		ServiceContract      ServiceContract    `gorm:"foreignKey:ServiceContractId"`
 		SalesDetailsId       int                `gorm:"column:order_id;type:int;not null;default:0;comment:閿�鍞鍗昳d" json:"salesDetailsId"` // 閿�鍞槑缁唅d
 		SalesDetails         SalesDetails       `gorm:"foreignKey:SalesDetailsId"`
-		OrderManage          OrderManage        `gorm:"foreignKey:OrderId"`
 		Subject              string             `gorm:"column:subject;type:varchar(255);not null;default:'';comment:涓婚" json:"subject"` // 涓婚
 		ProductId            int                `gorm:"column:product_id;type:int;not null;default:0;comment:浜у搧id" json:"productId"`    // 浜у搧id
 		Product              Product            `gorm:"foreignKey:ProductId"`

--
Gitblit v1.8.0