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
8b5b52b9
Commit
8b5b52b9
authored
Jun 04, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增页面
parent
39e2d283
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
376 additions
and
1 deletion
+376
-1
RequestParm.cs
Mall.Common/API/RequestParm.cs
+5
-0
ExportController.cs
Mall.WebApi/Controllers/Export/ExportController.cs
+59
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+26
-1
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+286
-0
No files found.
Mall.Common/API/RequestParm.cs
View file @
8b5b52b9
...
...
@@ -22,6 +22,11 @@ namespace Mall.Common.API
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 命令
/// </summary>
public
string
cmd
{
get
;
set
;
}
/// <summary>
/// 用户ID
/// </summary>
...
...
Mall.WebApi/Controllers/Export/ExportController.cs
0 → 100644
View file @
8b5b52b9
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Net
;
using
System.Net.Http
;
using
System.Net.Http.Headers
;
using
System.Threading.Tasks
;
using
Mall.Common.API
;
using
Microsoft.AspNetCore.Mvc
;
namespace
Mall.WebApi.Controllers.Export
{
/// <summary>
/// 文件下载
/// </summary>
public
class
ExportController
:
BaseController
{
/// <summary>
/// 文件流下载
/// </summary>
/// <param name="requestData"></param>
/// <returns></returns>
[
HttpPost
]
public
HttpResponseMessage
DownLoad
()
{
try
{
HttpResponseMessage
response
=
new
HttpResponseMessage
(
HttpStatusCode
.
OK
);
switch
(
RequestParm
.
cmd
)
{
//商品购买力TOP排行
case
"getSalesGoodTop"
:
var
file_SalesGood
=
new
Services
.
DMCService
.
BusService
().
DownLoadBusConfig
(
requestData
);
Stream
stream_SalesGood
=
new
MemoryStream
(
file_SalesGood
);
response
.
Content
=
new
StreamContent
(
stream
);
break
;
//用户购买力TOP排行
case
"getSalesUserTop"
:
var
file_SalesUser
=
new
Services
.
DMCService
.
BusService
().
DownLoadBusConfig
(
requestData
);
Stream
stream_SalesUser
=
new
MemoryStream
(
file_SalesUser
);
response
.
Content
=
new
StreamContent
(
stream_SalesUser
);
break
;
}
response
.
Content
.
Headers
.
ContentType
=
new
MediaTypeHeaderValue
(
"application/octet-stream"
);
response
.
Content
.
Headers
.
ContentDisposition
=
new
ContentDispositionHeaderValue
(
"attachment"
)
{
FileName
=
"Test.xls"
};
return
response
;
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
string
.
Format
(
"DownLoad_requestData: {0}"
,
Common
.
Plugin
.
JsonHelper
.
Serialize
(
requestData
)));
return
new
HttpResponseMessage
(
HttpStatusCode
.
NoContent
);
}
}
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
8b5b52b9
...
...
@@ -151,7 +151,7 @@ namespace Mall.WebApi.Controllers.MallBase
//授权页面热区
var
hotspotCancel
=
new
object
();
var
hotspotLogin
=
new
object
();
if
(
miniProgram
.
AuthDataList
!=
null
&&
miniProgram
.
AuthDataList
.
Count
>
0
)
if
(
miniProgram
.
AuthDataList
!=
null
&&
miniProgram
.
AuthDataList
.
Count
>
0
&&
miniProgram
.
AuthDataList
.
Count
==
2
)
{
var
first
=
miniProgram
.
AuthDataList
[
0
];
var
second
=
miniProgram
.
AuthDataList
[
1
];
...
...
@@ -166,6 +166,31 @@ namespace Mall.WebApi.Controllers.MallBase
hotspotCancel
=
first
;
}
}
else
{
hotspotLogin
=
new
AuthItem
()
{
width
=
224
,
height
=
80
,
left
=
340
,
top
=
566
,
defaultX
=
340
,
defaultY
=
566
,
link
=
""
,
open_type
=
"login"
};
hotspotCancel
=
new
AuthItem
()
{
width
=
224
,
height
=
80
,
left
=
84
,
top
=
566
,
defaultX
=
84
,
defaultY
=
566
,
link
=
""
,
open_type
=
"cancel"
};
}
auth_page
=
new
{
pic_url
=
miniProgram
.
AuthUrl
,
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
8b5b52b9
This diff is collapsed.
Click to expand it.
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