正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -409,9 +409,9 @@ func (controller *ImportController) parserAndInsert(file *os.File, fileName stri | @@ -409,9 +409,9 @@ func (controller *ImportController) parserAndInsert(file *os.File, fileName stri | ||
| 409 | return application.ThrowError(application.ARG_ERROR, "没有数据内容") | 409 | return application.ThrowError(application.ARG_ERROR, "没有数据内容") |
| 410 | } | 410 | } |
| 411 | 411 | ||
| 412 | - var filenameWithSuffix = path.Base(fileName) | ||
| 413 | - var fileSuffix = path.Ext(filenameWithSuffix) | ||
| 414 | - var filenameOnly = strings.TrimSuffix(filenameWithSuffix, fileSuffix) | 412 | + var nameWithSuffix = path.Base(fileName) |
| 413 | + var suffix = path.Ext(nameWithSuffix) | ||
| 414 | + var nameOnly = strings.TrimSuffix(nameWithSuffix, suffix) | ||
| 415 | 415 | ||
| 416 | ruService := service.NewEvaluationTemplateService() | 416 | ruService := service.NewEvaluationTemplateService() |
| 417 | in := &templateCommand.CreateTemplateCommand{} | 417 | in := &templateCommand.CreateTemplateCommand{} |
| @@ -419,7 +419,7 @@ func (controller *ImportController) parserAndInsert(file *os.File, fileName stri | @@ -419,7 +419,7 @@ func (controller *ImportController) parserAndInsert(file *os.File, fileName stri | ||
| 419 | ua := middlewares.GetUser(controller.Ctx) | 419 | ua := middlewares.GetUser(controller.Ctx) |
| 420 | in.CompanyId = ua.CompanyId | 420 | in.CompanyId = ua.CompanyId |
| 421 | in.CreatorId = ua.UserId | 421 | in.CreatorId = ua.UserId |
| 422 | - in.Name = filenameOnly | 422 | + in.Name = nameOnly |
| 423 | in.Describe = "" | 423 | in.Describe = "" |
| 424 | in.NodeContents = list | 424 | in.NodeContents = list |
| 425 | 425 |
-
请 注册 或 登录 后发表评论