From 73b6baf6af3d88cdcb0e2df7932a9bd96b0b85c5 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 01 七月 2024 22:32:34 +0800
Subject: [PATCH] 月度统计出入库按类型汇总报表定时任务和手动跑任务接口

---
 utils/upload/seaweed.go |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/utils/upload/seaweed.go b/utils/upload/seaweed.go
index 40eea74..5f10ab5 100644
--- a/utils/upload/seaweed.go
+++ b/utils/upload/seaweed.go
@@ -1,14 +1,13 @@
 package upload
 
 import (
-	"basic.com/fileserver/WeedFSClient.git"
-	uuid "github.com/satori/go.uuid"
 	"time"
 	"wms/conf"
 	"wms/pkg/logx"
+	"wms/pkg/weedfs"
 )
 
-func UploadFileToSeaWeed(fileType, ext string, fileBytes []byte) (string, error) {
+func UploadFileToSeaWeed(fileType, fileName string, fileBytes []byte) (string, error) {
 	//assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=" + time.Now().Format("2006-01-02 15:04:05")[:10] + "-" + conf.WebConf.ServerId + "-" + fileType
 	assignUrl := conf.WebConf.FileServer + "/dir/assign?collection=12345-" + conf.WebConf.ServerId + "-" + fileType
 
@@ -18,7 +17,7 @@
 		return picUrl, err
 	}
 
-	picFileName := uuid.NewV4().String() + "." + ext
-	go WeedFSClient.UploadFile(picUrl, picFileName, fileBytes, 3*time.Second)
+	//picFileName := uuid.NewV4().String() + "." + ext
+	go WeedFSClient.UploadFile(picUrl, fileName, fileBytes, 3*time.Second)
 	return picUrl, nil
 }

--
Gitblit v1.8.0