Skip to content

Commit

Permalink
fix: 修复在没有使用GVA模型的情况下新增字段报错的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelmaxQm committed Oct 29, 2024
1 parent 845583d commit 5c1b608
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions server/model/system/request/sys_auto_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,19 @@ func (r *AutoCode) Pretreatment() error {
}
}
} // GvaModel
{
if r.IsAdd {
r.PrimaryField = &AutoCodeField{
FieldName: "",
FieldType: "",
FieldDesc: "",
FieldJson: "",
DataTypeLong: "",
Comment: "",
ColumnName: "",
}
}
}
if r.Package == "" {
return errors.New("Package为空!")
} // 增加判断:Package不为空
Expand Down

0 comments on commit 5c1b608

Please sign in to comment.