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
55511f50
Commit
55511f50
authored
Sep 02, 2021
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
f7229c80
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 @
55511f50
...
@@ -6,8 +6,11 @@ using Mall.Repository.TradePavilion;
...
@@ -6,8 +6,11 @@ using Mall.Repository.TradePavilion;
using
Mall.Repository.User
;
using
Mall.Repository.User
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.IO
;
using
System.IO
;
using
System.IO.Compression
;
using
System.Linq
;
using
System.Linq
;
using
System.Net
;
using
System.Text
;
using
System.Text
;
using
VT.FW.DB
;
using
VT.FW.DB
;
...
@@ -898,7 +901,7 @@ namespace Mall.Module.TradePavilion
...
@@ -898,7 +901,7 @@ namespace Mall.Module.TradePavilion
errorMsg
=
""
;
errorMsg
=
""
;
//存储的临时文件地址
//存储的临时文件地址
string
rootBook
=
AppDomain
.
CurrentDomain
.
BaseDirectory
;
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
});
var
listModel
=
firstShop_ListRepository
.
GetList
(
new
RB_FirstShop_List_Extend
{
MallBaseId
=
mallBaseId
,
QIds
=
listIds
});
...
@@ -941,7 +944,7 @@ namespace Mall.Module.TradePavilion
...
@@ -941,7 +944,7 @@ namespace Mall.Module.TradePavilion
if
(
elist
.
Any
())
if
(
elist
.
Any
())
{
{
var
companyName
=
clist
.
Where
(
x
=>
x
.
CreateBy
==
enrollModel
.
UserId
).
FirstOrDefault
()?.
CompanyName
??
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
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
))
if
(!
Directory
.
Exists
(
templistPath
))
{
{
Directory
.
CreateDirectory
(
templistPath
);
Directory
.
CreateDirectory
(
templistPath
);
...
@@ -957,12 +960,48 @@ namespace Mall.Module.TradePavilion
...
@@ -957,12 +960,48 @@ namespace Mall.Module.TradePavilion
string
Name
=
obj
.
Name
;
string
Name
=
obj
.
Name
;
foreach
(
var
qitem
in
obj
.
FileList
)
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"
)
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)
// {
// }
//}
}
}
}
}
...
@@ -970,7 +1009,11 @@ namespace Mall.Module.TradePavilion
...
@@ -970,7 +1009,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
#
endregion
return
""
;
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