Bladeren bron

Merge branch 'dev/v1.0.18_wjh' into feature/v1.0.17

* dev/v1.0.18_wjh:
  xg
Jianghan 1 jaar geleden
bovenliggende
commit
e0fe0e36dc
1 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 6 6
      service/exprot.go

+ 6 - 6
service/exprot.go

@@ -52,7 +52,7 @@ func (a *ExportReq) AllProjectExport() {
 	pathArr := export("customer_data_ttzl_project", tableColumn, exportKey, timeStr)
 	if len(pathArr) > 0 {
 		folderPath := fmt.Sprintf("%s/%s", ExportDirectory, timeStr)
-		pathstr := compressFiles(pathArr, folderPath, ExportUrl, timeStr)
+		pathstr := compressFiles(pathArr, ExportUrl, folderPath, timeStr)
 		state := sendMail("项目", a.Mail, pathstr)
 		BiService.Insert("export_record", map[string]interface{}{
 			"positionId": a.PositionId,
@@ -81,7 +81,7 @@ func (a *ExportReq) AllInfoExport() {
 	pathArr := export("customer_data_ttzl", tableColumn, exportKey, timeStr)
 	if len(pathArr) > 0 {
 		folderPath := fmt.Sprintf("%s/%s", ExportDirectory, timeStr)
-		pathstr := compressFiles(pathArr, folderPath, ExportUrl, timeStr)
+		pathstr := compressFiles(pathArr, ExportUrl, folderPath, timeStr)
 		state := sendMail("标讯", a.Mail, pathstr)
 		BiService.Insert("export_record", map[string]interface{}{
 			"positionId": a.PositionId,
@@ -245,7 +245,7 @@ func compressFiles(filePattern []string, url, path, timeStr string) string {
 		log.Fatal(err)
 	}
 	log.Printf("Files compressed to: %s", absPath)
-	return fmt.Sprintf("%s/%s/%s.zip", url, timeStr, timeStr)
+	return fmt.Sprintf("%s/%s/%s.zip", url, path, timeStr)
 }
 
 // 数据导出(通用)
@@ -260,10 +260,10 @@ func (e *ExportByDbReq) ExportDataByDb() []byte {
 	if stype == "" {
 		stype = "public"
 	}
-	folderPath := fmt.Sprintf("%s/%s", ComFileDir, stype)
-	pathArr := exportA(e.Query, folderPath, timeStr, key)
+	path1 := fmt.Sprintf("%s/%s", ComFileDir, stype)
+	pathArr := exportA(e.Query, path1, timeStr, key)
 	if len(pathArr) > 0 {
-		folderPath = fmt.Sprintf("%s/%s", folderPath, timeStr)
+		folderPath := fmt.Sprintf("%s/%s", path1, timeStr)
 		pathstr := compressFiles(pathArr, ComFileUrl, folderPath, timeStr)
 		state := sendMailA(e.Title, e.Mails, e.Content, pathstr)