jiangshuai
2024-01-05 62521666983845e0ed33b8d646c1814a28f5fbc3
controllers/operation.go
@@ -860,11 +860,11 @@
}
func ExportInputSelfmade(category constvar.FileTemplateCategory, operation *models.Operation) (string, error) {
   template, err := models.NewFileTemplateAttachmentSearch().SetPreload(true).SetCategory(category).First()
   template, err := models.NewFileTemplateAttachmentSearch().SetCategory(category).First()
   if err != nil {
      return "", errors.New("获取模版记录失败:" + err.Error())
   }
   readerCloser, err := http.HttpGetWithReadCloser(template.Attachment.FileUrl)
   readerCloser, err := http.HttpGetWithReadCloser(template.FileUrl)
   if err != nil {
      return "", errors.New("获取模版失败:" + err.Error())
   }
@@ -941,11 +941,11 @@
func ExportOutputOperation(category constvar.FileTemplateCategory, operation *models.Operation) (string, error) {
   repositoryLevels := strings.Split(operation.Location.JointName, "/")
   template, err := models.NewFileTemplateAttachmentSearch().SetPreload(true).SetCategory(category).First()
   template, err := models.NewFileTemplateAttachmentSearch().SetCategory(category).First()
   if err != nil {
      return "", errors.New("获取模版记录失败:" + err.Error())
   }
   readerCloser, err := http.HttpGetWithReadCloser(template.Attachment.FileUrl)
   readerCloser, err := http.HttpGetWithReadCloser(template.FileUrl)
   if err != nil {
      return "", errors.New("获取模版失败:" + err.Error())
   }