Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
af214f81
Commit
af214f81
authored
Sep 02, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
a48da09a
75d2342f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
4 deletions
+47
-4
FirstShopListModule.cs
Mall.Module.TradePavilion/FirstShopListModule.cs
+47
-4
No files found.
Mall.Module.TradePavilion/FirstShopListModule.cs
View file @
af214f81
...
...
@@ -6,8 +6,11 @@ using Mall.Repository.TradePavilion;
using
Mall.Repository.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.IO
;
using
System.IO.Compression
;
using
System.Linq
;
using
System.Net
;
using
System.Text
;
using
VT.FW.DB
;
...
...
@@ -1032,7 +1035,7 @@ namespace Mall.Module.TradePavilion
errorMsg
=
""
;
//存储的临时文件地址
string
rootBook
=
AppDomain
.
CurrentDomain
.
BaseDirectory
;
string
tempPath
=
rootBook
+
"/upfile/temporary/firstshopenrollzip"
;
string
tempPath
=
rootBook
+
"/upfile/temporary/firstshopenrollzip
/
"
;
//获取榜单信息
var
listModel
=
firstShop_ListRepository
.
GetList
(
new
RB_FirstShop_List_Extend
{
MallBaseId
=
mallBaseId
,
QIds
=
listIds
});
...
...
@@ -1075,7 +1078,7 @@ namespace Mall.Module.TradePavilion
if
(
elist
.
Any
())
{
var
companyName
=
clist
.
Where
(
x
=>
x
.
CreateBy
==
enrollModel
.
UserId
).
FirstOrDefault
()?.
CompanyName
??
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
var
templistPath
=
rootBook
+
"/upfile/temporary/firstshopenrollzip/"
+
listItem
.
ListName
+
"/"
+
companyName
;
//路径
var
templistPath
=
tempPath
+
"file/"
+
listItem
.
ListName
+
"/"
+
companyName
+
"/"
;
//路径
if
(!
Directory
.
Exists
(
templistPath
))
{
Directory
.
CreateDirectory
(
templistPath
);
...
...
@@ -1091,12 +1094,48 @@ namespace Mall.Module.TradePavilion
string
Name
=
obj
.
Name
;
foreach
(
var
qitem
in
obj
.
FileList
)
{
//FileHelper.CreateImage(); 下载腾讯云至本地
try
{
Uri
uri
=
new
Uri
(
qitem
);
//imgPath :网络图片地址
WebRequest
webRequest
=
WebRequest
.
Create
(
uri
);
// byte[] bytes;
using
(
WebResponse
webResponse
=
webRequest
.
GetResponse
())
{
Bitmap
bitmap
=
new
Bitmap
(
webResponse
.
GetResponseStream
());
bitmap
.
Save
(
templistPath
+
Path
.
GetFileName
(
qitem
),
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
}
}
catch
(
Exception
ex
)
{
}
}
}
else
if
(
itemFile
.
CompKey
==
"VideoUploadComp"
)
{
//视频处理
//foreach (var qitem in obj.FileList)
//{
// try
// {
// Uri uri = new Uri(qitem); //imgPath :网络图片地址
// WebRequest webRequest = WebRequest.Create(uri);
// // byte[] bytes;
// using (WebResponse webResponse = webRequest.GetResponse())
// {
// Bitmap bitmap = new Bitmap(webResponse.GetResponseStream());
// bitmap.Save(templistPath + Path.GetFileName(qitem), System.Drawing.Imaging.ImageFormat.Jpeg);
// }
// }
// catch (Exception ex)
// {
// }
//}
}
}
...
...
@@ -1104,7 +1143,11 @@ namespace Mall.Module.TradePavilion
}
}
ZipHelper
.
Zip
(
tempPath
,
"榜单导出文件夹"
,
ref
tempFoldr
);
//打包方法
Common
.
Plugin
.
ZipHelper
.
Zip
(
tempPath
+
"file/"
,
tempPath
+
"/zip/ziliao.zip"
,
ref
tempFoldr
);
// ZipFile.CreateFromDirectory(tempPath+ "file/", tempPath + "/zip/ziliao.zip");
// ZipHelper.ZipDirectory(tempPath, rootBook + "/upfile/temporary/firstshopenrollzip/榜单导出文件夹/ .zip","");
// ZipHelper.Zip(tempPath, "榜单导出文件夹",ref tempFoldr); //打包方法
#
endregion
return
""
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment