From e94361295f872c12256c7e972d58ca903a556f05 Mon Sep 17 00:00:00 2001 From: gazebo Date: Fri, 24 May 2019 17:38:16 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=B8=83=E7=89=9B=E4=BA=91=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E6=B7=BB=E5=8A=A0=E5=89=8D=E7=BC=80=E5=8C=BA=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/orderman_ext.go | 2 +- business/jxstore/financial/financial.go | 2 +- business/jxutils/jxutils_cms.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/business/jxcallback/orderman/orderman_ext.go b/business/jxcallback/orderman/orderman_ext.go index 1c8705f35..814146244 100644 --- a/business/jxcallback/orderman/orderman_ext.go +++ b/business/jxcallback/orderman/orderman_ext.go @@ -481,7 +481,7 @@ func (c *OrderManager) ExportOrders(ctx *jxcontext.Context, fromDateStr, toDateS keyPart = append(keyPart, toDateStr) } keyPart = append(keyPart, time.Now().Format("20060102T150405")+".xlsx") - key := strings.Join(keyPart, "_") + key := "export/" + strings.Join(keyPart, "_") formUploader := storage.NewFormUploader(cfg) ret := storage.PutRet{} for i := 0; i < 3; i++ { diff --git a/business/jxstore/financial/financial.go b/business/jxstore/financial/financial.go index 60cfce180..e4a4a3fa2 100644 --- a/business/jxstore/financial/financial.go +++ b/business/jxstore/financial/financial.go @@ -61,7 +61,7 @@ func SendFilesToStores(ctx *jxcontext.Context, files []*multipart.FileHeader, ti globals.SugarLogger.Debugf("SendFilesToStores upload file:%s", fileHeader.Filename) if err == nil { ret := storage.PutRet{} - key := "storeBill_" + utils.Int2Str(storeID) + "_" + strings.ToLower(utils.GetUUID()) + path.Ext(fileHeader.Filename) + key := "storeBill/" + utils.Int2Str(storeID) + "_" + strings.ToLower(utils.GetUUID()) + path.Ext(fileHeader.Filename) formUploader := storage.NewFormUploader(cfg) for i := 0; i < 3; i++ { if err = formUploader.Put(context.Background(), &ret, upToken, key, file, fileHeader.Size, &storage.PutExtra{}); err == nil { diff --git a/business/jxutils/jxutils_cms.go b/business/jxutils/jxutils_cms.go index 47105d484..8ffc4eaeb 100644 --- a/business/jxutils/jxutils_cms.go +++ b/business/jxutils/jxutils_cms.go @@ -334,7 +334,7 @@ func DownloadFileByURL(fileURL string) (bodyData []byte, fileMD5 string, err err ///// func GenPicFileName(suffix string) string { - return fmt.Sprintf("%x%s", md5.Sum([]byte(utils.GetUUID()+suffix)), suffix) + return fmt.Sprintf("image/%x%s", md5.Sum([]byte(utils.GetUUID()+suffix)), suffix) } func GuessVendorIDFromVendorStoreID(vendorStoreID int64) (vendorID int) {