From dd39909b3d8172856313ea7b2e19d1d7a039a582 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期二, 15 八月 2023 16:43:22 +0800
Subject: [PATCH] fix

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

diff --git a/api/v1/client.go b/api/v1/client.go
index 1162b78..c4da6b7 100644
--- a/api/v1/client.go
+++ b/api/v1/client.go
@@ -201,3 +201,27 @@
 		Count: int(total),
 	})
 }
+
+// CheckName
+//
+//	@Tags		Client
+//	@Summary	妫�鏌ュ鎴峰悕绉版槸鍚﹂噸澶�
+//	@Produce	application/json
+//	@Param		object	body		request.CheckClientName	true	"鍙傛暟"
+//	@Success	200		{object}	contextx.Response{}
+//	@Router		/api/client/checkName [post]
+func (cli *ClientApi) CheckName(c *gin.Context) {
+	var params request.CheckClientName
+	ctx, ok := contextx.NewContext(c, &params)
+	if !ok {
+		return
+	}
+
+	errCode := clientService.CheckName(params.Name)
+	if errCode != ecode.OK {
+		ctx.Fail(errCode)
+		return
+	}
+
+	ctx.Ok()
+}

--
Gitblit v1.8.0