From 92bd52259879ffb1a352e154c9a613e873c64105 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 09 四月 2024 14:02:06 +0800 Subject: [PATCH] fix --- controllers/dict.go | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/controllers/dict.go b/controllers/dict.go index b2af281..1d33456 100644 --- a/controllers/dict.go +++ b/controllers/dict.go @@ -88,6 +88,9 @@ } func (slf DictController) ParamsCheck(params models.Dict) (err error) { + if params.Number == "" || params.Name == "" { + return errors.New("鍙傛暟缂哄け") + } dict, err := models.NewDictSearch().SetNumber(params.Number).First() if err != gorm.ErrRecordNotFound && dict != nil && dict.ID != params.ID { return errors.New("缂栧彿閲嶅") -- Gitblit v1.8.0