From f65ce9c19568745003b22e82060fb38c2885c701 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 13 十月 2023 15:36:30 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/crm

---
 api/v1/client.go |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/api/v1/client.go b/api/v1/client.go
index 6e45eb2..40375c9 100644
--- a/api/v1/client.go
+++ b/api/v1/client.go
@@ -47,6 +47,13 @@
 		ctx.Fail(errCode)
 		return
 	}
+	if params.CodeRule.Method == 1 {
+		autoCode := model.GetAutoCode(client.Id, &params.CodeRule)
+		m := map[string]interface{}{
+			"number": autoCode,
+		}
+		_ = model.NewClientSearch(nil).SetId(client.Id).UpdateByMap(m)
+	}
 
 	ctx.Ok()
 }
@@ -108,6 +115,7 @@
 	client.Business.EnterpriseNatureId = params.EnterpriseNatureId
 	client.Business.EnterpriseScaleId = params.EnterpriseScaleId
 	client.MemberId = params.MemberId
+	client.CodeStandID = params.CodeStandID
 
 	//if params.Contact.Name != "" {
 	// assign the client's member id to contact when adding

--
Gitblit v1.8.0