Browse Source

Merge branch 'feature/jiayue' into debug

hsun 1 year ago
parent
commit
6281be593d
2 changed files with 3 additions and 4 deletions
  1. 3 3
      controller/index_data/jiayue_index.go
  2. 0 1
      services/index_data/jiayue_platform.go

+ 3 - 3
controller/index_data/jiayue_index.go

@@ -250,9 +250,9 @@ func (j *JiaYueIndexController) BuildImportExcel(c *gin.Context) {
 		resp.FailMsg("保存失败", "保存文件失败, err: "+e.Error(), c)
 		return
 	}
-	//defer func() {
-	//	_ = os.Remove(downloadPath)
-	//}()
+	defer func() {
+		_ = os.Remove(downloadPath)
+	}()
 
 	var buffer bytes.Buffer
 	_ = xlsxFile.Write(&buffer)

+ 0 - 1
services/index_data/jiayue_platform.go

@@ -392,7 +392,6 @@ func GetJiaYueImportData(sourceArr []string) (items []JiaYueImportIndexResp, err
 			mid, _ := strconv.Atoi(m)
 			menuIds = append(menuIds, mid)
 		}
-		menuIds = append(menuIds, menu.Id)
 
 		// 取出目录名称
 		for k, m := range menuIds {