fix: 代码生成器 结构体简称发生的关键字冲突 #1089
This commit is contained in:
@@ -38,7 +38,7 @@ func (autoApi *AutoCodeApi) PreviewTemp(c *gin.Context) {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
a.KeyWord() // 处理go关键字
|
||||
a.PackageT = caser.String(a.Package)
|
||||
autoCode, err := autoCodeService.PreviewTemp(a)
|
||||
if err != nil {
|
||||
@@ -65,6 +65,7 @@ func (autoApi *AutoCodeApi) CreateTemp(c *gin.Context) {
|
||||
response.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
a.KeyWord() // 处理go关键字
|
||||
var apiIds []uint
|
||||
if a.AutoCreateApiToSql {
|
||||
if ids, err := autoCodeService.AutoCreateApi(&a); err != nil {
|
||||
|
Reference in New Issue
Block a user