Skip to content

Commit

Permalink
fix: 无法自动化新增字段的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelmaxQm authored Nov 19, 2024
1 parent 8073e98 commit c909d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/service/system/auto_code_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("已经创建过此数据结构或重复简称,请勿重复创建!")
}

Expand Down

0 comments on commit c909d32

Please sign in to comment.