From c909d32c56abf404924f9ff99e1b0694edfe3f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?PiexlMax=28=E5=A5=87=E6=B7=BC?= <165128580+pixelmaxQm@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:31:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0=E6=B3=95=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/service/system/auto_code_template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/service/system/auto_code_template.go b/server/service/system/auto_code_template.go index f355263897..8d52e3172f 100644 --- a/server/service/system/auto_code_template.go +++ b/server/service/system/auto_code_template.go @@ -191,7 +191,7 @@ func (s *autoCodeTemplate) Preview(ctx context.Context, info request.AutoCode) ( return nil, errors.Wrap(err, "查询包失败!") } // 增加判断: 重复创建struct 或者重复的简称 - if AutocodeHistory.Repeat(info.BusinessDB, info.StructName, info.Abbreviation, info.Package) { + if AutocodeHistory.Repeat(info.BusinessDB, info.StructName, info.Abbreviation, info.Package) && !info.IsAdd { return nil, errors.New("已经创建过此数据结构或重复简称,请勿重复创建!") }