增加自动化排序功能

This commit is contained in:
piexlmax
2022-10-30 20:27:22 +08:00
parent c300e16de9
commit 192c0e529d
6 changed files with 54 additions and 6 deletions

View File

@@ -161,6 +161,10 @@ func (autoCodeService *AutoCodeService) PreviewTemp(autoCode system.AutoCodeStru
autoCode.NeedValid = true
break
}
if autoCode.Fields[i].Sort {
autoCode.NeedSort = true
break
}
}
dataList, _, needMkdir, err := autoCodeService.getNeedList(&autoCode)
if err != nil {
@@ -250,6 +254,10 @@ func (autoCodeService *AutoCodeService) CreateTemp(autoCode system.AutoCodeStruc
autoCode.NeedValid = true
break
}
if autoCode.Fields[i].Sort {
autoCode.NeedSort = true
break
}
}
// 增加判断: 重复创建struct
if autoCode.AutoMoveFile && AutoCodeHistoryServiceApp.Repeat(autoCode.BusinessDB, autoCode.StructName, autoCode.Package) {