- 修改
server/model/sys_auto_code.go
server/service/sys_auto_code.go
server/utils/file_operations.go
This commit is contained in:
songzhibin97
2021-03-24 14:12:07 +08:00
parent a2f4d58648
commit 73cc49448e
3 changed files with 37 additions and 8 deletions
+5
View File
@@ -320,6 +320,11 @@ func AutoCreateApi(a *model.AutoCodeStruct) (err error) {
}
func getNeedList(autoCode *model.AutoCodeStruct) (dataList []tplData, fileList []string, needMkdir []string, err error) {
// 去除所有空格
utils.TrimSpace(autoCode)
for _, field := range autoCode.Fields {
utils.TrimSpace(field)
}
// 获取 basePath 文件夹下所有tpl文件
tplFileList, err := GetAllTplFile(basePath, nil)
if err != nil {