Merge branch 'flipped-aurora:main' into main

This commit is contained in:
zayn 2024-11-19 01:45:37 -08:00 committed by GitHub
commit 362b92c1d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ func (s *autoCodeTemplate) Preview(ctx context.Context, info request.AutoCode) (
return nil, errors.Wrap(err, "查询包失败!") return nil, errors.Wrap(err, "查询包失败!")
} }
// 增加判断: 重复创建struct 或者重复的简称 // 增加判断: 重复创建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("已经创建过此数据结构或重复简称,请勿重复创建!") return nil, errors.New("已经创建过此数据结构或重复简称,请勿重复创建!")
} }