From c6d19b35b74d020b3ca28d33101d8f1695e39945 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期五, 21 七月 2023 13:49:25 +0800 Subject: [PATCH] ignore --- api/v1/client.go | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/api/v1/client.go b/api/v1/client.go index 8df8a21..96aa141 100644 --- a/api/v1/client.go +++ b/api/v1/client.go @@ -68,20 +68,20 @@ func checkClientParams(params request.Client) (int, *model.Client) { client := new(model.Client) - if params.Name == "" { - return ecode.InvalidParams, nil - } + //if params.Name == "" { + // return ecode.InvalidParams, nil + //} client.Name = params.Name - if params.ClientStatusId == 0 { - return ecode.InvalidParams, nil - } - client.ClientStatusId = params.ClientStatusId - - if params.MemberId == 0 { - return ecode.InvalidParams, nil - } + //if params.ClientStatusId == 0 { + // return ecode.InvalidParams, nil + //} + //client.ClientStatusId = params.ClientStatusId + // + //if params.MemberId == 0 { + // return ecode.InvalidParams, nil + //} client.MemberId = params.MemberId t, err := checkTimeFormat(params.NextVisitTime) @@ -188,6 +188,8 @@ return } + client.Id = params.Id + errCode = clientService.UpdateClient(client) if errCode != ecode.OK { ctx.Fail(errCode) -- Gitblit v1.8.0