From cc3f07175d93b5f4fbcc6fd8a87a563a7f8e1a7c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 15 八月 2023 14:26:27 +0800
Subject: [PATCH] 服务单批量删除接口

---
 api/v1/client.go |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/api/v1/client.go b/api/v1/client.go
index 3be607b..1162b78 100644
--- a/api/v1/client.go
+++ b/api/v1/client.go
@@ -32,9 +32,7 @@
 		return
 	}
 
-	// check member exist
-
-	errCode = clientService.AddClient(client)
+	errCode = clientService.AddClient(client, params.SalesLeadsId)
 	if errCode != ecode.OK {
 		ctx.Fail(errCode)
 		return
@@ -59,7 +57,6 @@
 	//if params.MemberId == 0 {
 	//	return ecode.InvalidParams, nil
 	//}
-	client.MemberId = params.MemberId
 
 	t, err := checkTimeFormat(params.NextVisitTime)
 	if err != nil {
@@ -86,6 +83,7 @@
 	client.ClientOriginId = params.ClientOriginId
 	client.ClientLevelId = params.ClientLevelId
 	client.DetailAddress = params.DetailAddress
+	client.ClientStatusId = params.ClientStatusId
 	client.Remark = params.Remark
 	client.Number = params.Number
 	client.ServiceMemberId = params.ServiceMemberId
@@ -99,6 +97,7 @@
 	client.Business.IndustryId = params.IndustryId
 	client.Business.EnterpriseNatureId = params.EnterpriseNatureId
 	client.Business.EnterpriseScaleId = params.EnterpriseScaleId
+	client.MemberId = params.MemberId
 
 	if params.Contact.Name != "" {
 		// assign the client's member id to contact when adding
@@ -191,7 +190,7 @@
 		return
 	}
 
-	clients, total, errCode := clientService.GetClientList(params.Page, params.PageSize, params.Keyword)
+	clients, total, errCode := clientService.GetClientList(params.Page, params.PageSize, params.SearchMap)
 	if errCode != ecode.OK {
 		ctx.Fail(errCode)
 		return

--
Gitblit v1.8.0