From 88702f1d3db33a3ee166ba7615ae39b8a719143f Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 13 十月 2023 15:26:51 +0800
Subject: [PATCH] Merge branch 'feat-sso'

---
 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