From 08d858716ad674ebe81e9c11c62c9ec4b6ce8d87 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期四, 17 八月 2023 20:00:45 +0800 Subject: [PATCH] add --- api/v1/faultType.go | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/api/v1/faultType.go b/api/v1/faultType.go index 2b2beb5..233652f 100644 --- a/api/v1/faultType.go +++ b/api/v1/faultType.go @@ -71,6 +71,10 @@ if !ok { return } + if params.Id == 0 { + ctx.Fail(ecode.ParamsErr) + } + params.FaultType.Id = params.Id errCode := service.NewFaultTypeService().UpdateFaultType(¶ms.FaultType) if errCode != ecode.OK { -- Gitblit v1.8.0