From a934b5ea45f84c71d9d309a1c69bfa21d1898b4a Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 17 八月 2023 10:08:36 +0800 Subject: [PATCH] 增加服务人员返回 --- api/v1/client.go | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/api/v1/client.go b/api/v1/client.go index 1162b78..b439fc6 100644 --- a/api/v1/client.go +++ b/api/v1/client.go @@ -166,7 +166,7 @@ client.Id = params.Id - errCode = clientService.UpdateClient(client) + errCode = clientService.UpdateClient(client, params.ContactId) if errCode != ecode.OK { ctx.Fail(errCode) return @@ -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, ¶ms) + if !ok { + return + } + + errCode := clientService.CheckName(params.Name) + if errCode != ecode.OK { + ctx.Fail(errCode) + return + } + + ctx.Ok() +} -- Gitblit v1.8.0