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
4b1b0734
Commit
4b1b0734
authored
Sep 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4d2f2b9e
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
184 additions
and
103 deletions
+184
-103
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+30
-17
TestController.cs
Mall.WebApi/Controllers/CAP/TestController.cs
+3
-3
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+9
-8
AppletSchoolController.cs
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
+2
-1
EducationController.cs
Mall.WebApi/Controllers/Education/EducationController.cs
+2
-1
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+8
-7
DestinationController.cs
Mall.WebApi/Controllers/MallBase/DestinationController.cs
+2
-1
ShareController.cs
Mall.WebApi/Controllers/MarketingCenter/ShareController.cs
+5
-4
StatisticsController.cs
...ebApi/Controllers/MarketingCenter/StatisticsController.cs
+3
-2
SurveyController.cs
Mall.WebApi/Controllers/MarketingCenter/SurveyController.cs
+2
-1
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+12
-11
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+3
-2
AppletStoresController.cs
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
+8
-7
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+20
-18
TradeController.cs
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
+10
-8
AppletLoginController.cs
Mall.WebApi/Controllers/User/AppletLoginController.cs
+11
-1
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+2
-1
MemberUserController.cs
Mall.WebApi/Controllers/User/MemberUserController.cs
+2
-1
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+4
-3
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+5
-4
UserController.cs
Mall.WebApi/Controllers/User/UserController.cs
+3
-2
Mall.WebApi.csproj
Mall.WebApi/Mall.WebApi.csproj
+1
-0
Startup.cs
Mall.WebApi/Startup.cs
+37
-0
No files found.
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Google.Protobuf.WellKnownTypes
;
using
Mall.Common
;
using
Mall.Common.API
;
...
...
@@ -41,7 +42,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
#
region
直播房间信息
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetLiveHouseList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -74,7 +76,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[
HttpPost
]
[
Obsolete
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetLiveListByLiveStatus
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -148,7 +151,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetSupplierAllList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -164,7 +168,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetOrderProfitLossList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -254,7 +259,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
FileContentResult
GetOrderProfitLossExcel
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -381,7 +387,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
FileContentResult
GetFXOrderProfitLossExcel
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -629,7 +636,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetGoodsList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -647,7 +655,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetDistributorInfoList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -665,7 +674,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetTotalOrderProfitLoss_V2
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -817,7 +827,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetTotalOrderProfitLoss
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -886,7 +897,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetOrderCommissionList
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1418,7 +1430,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetDSMonthStatistics
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1446,7 +1459,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
FileContentResult
GetDSMonthStatisticsToExcel
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1520,7 +1533,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetDSMoreMonthStatistics
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1559,7 +1572,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
FileContentResult
GetDSMoreMonthStatisticsToExcel
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1641,7 +1654,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetDSYearStartistics
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1667,7 +1680,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
FileContentResult
GetDSYearStartisticsToExcel
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
Mall.WebApi/Controllers/CAP/TestController.cs
View file @
4b1b0734
...
...
@@ -2,7 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.Common.API
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Authorization
;
...
...
@@ -26,7 +26,7 @@ namespace Mall.WebApi.Controllers.CAP
}
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
Get
()
{
ApiResult
apiResult
=
new
ApiResult
()
...
...
@@ -41,7 +41,7 @@ namespace Mall.WebApi.Controllers.CAP
}
[
NonAction
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
DotNetCore
.
CAP
.
CapSubscribe
(
"show.time"
)]
public
void
CheckReceiveMessage
(
string
result
)
{
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
4b1b0734
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Dnc.Api.Throttle
;
using
Mall.CacheManager.User
;
using
Mall.Common
;
using
Mall.Common.API
;
...
...
@@ -1707,7 +1708,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetActivityTypeList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -1729,7 +1730,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetActivityPage
()
{
var
req
=
RequestParm
;
...
...
@@ -1856,7 +1857,7 @@ namespace Mall.WebApi.Controllers.Education
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetActivityDetial
()
{
var
req
=
RequestParm
;
...
...
@@ -2444,7 +2445,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetActivityPageJXH
()
{
var
req
=
RequestParm
;
...
...
@@ -2520,7 +2521,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetUserActivityListJXH
()
{
// var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
...
...
@@ -2582,7 +2583,7 @@ namespace Mall.WebApi.Controllers.Education
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetActivityDetialJXH
()
{
var
req
=
RequestParm
;
...
...
@@ -2704,7 +2705,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
CancelCommerceConsultJXH
()
{
bool
flag
=
false
;
...
...
@@ -2772,7 +2773,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetUserJoinActivityPageListJXH
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
...
...
Mall.WebApi/Controllers/Education/AppletSchoolController.cs
View file @
4b1b0734
...
...
@@ -16,6 +16,7 @@ using Mall.Common.Plugin;
using
Google.Protobuf.WellKnownTypes
;
using
Mall.Model.Entity.Education
;
using
Microsoft.AspNetCore.Authorization
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.Education
{
...
...
@@ -635,7 +636,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
HttpPost
]
public
ApiResult
GetMiAiDynamicList
(
object
requestMsg
)
{
...
...
Mall.WebApi/Controllers/Education/EducationController.cs
View file @
4b1b0734
...
...
@@ -22,6 +22,7 @@ using Mall.Common.Enum.Finance;
using
Mall.Common
;
using
Mall.Common.Enum.Education
;
using
Microsoft.AspNetCore.Authorization
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.Education
{
...
...
@@ -3625,7 +3626,7 @@ namespace Mall.WebApi.Controllers.Education
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
SetActivityCommissionInfo
()
{
var
userInfo
=
base
.
UserInfo
;
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.CacheManager.User
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
...
...
@@ -71,7 +72,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetHome
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -480,7 +481,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetAppConfig
()
{
string
MiniAppId
=
""
;
...
...
@@ -512,7 +513,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetUserCenter
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -678,7 +679,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetUserInfo
()
{
if
(
RequestParm
.
OpenId
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
RequestParm
.
OpenId
))
...
...
@@ -698,7 +699,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetWeChatOpenId
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -721,7 +722,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetMessageTemplate
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -745,7 +746,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetGoosPoster
()
{
string
MiniAppId
=
""
;
...
...
Mall.WebApi/Controllers/MallBase/DestinationController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.Common.API
;
using
Mall.Common.Data
;
using
Mall.Common.Plugin
;
...
...
@@ -32,7 +33,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <param name="ParentID">父节点编号</param>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetChildList
()
{
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
Mall.WebApi/Controllers/MarketingCenter/ShareController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.MarketingCenter
;
...
...
@@ -48,7 +49,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// 获取分享分类列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetShareCategoryList
()
{
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Share_Category_Extend
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -113,7 +114,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// 获取分享详情分页列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetShareFriendPageList
()
{
var
parms
=
RequestParm
;
...
...
@@ -131,7 +132,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// 小程序获取分享分页列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
AppGetShareFriendPage
()
{
var
parms
=
RequestParm
;
...
...
@@ -309,7 +310,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// 更新分享数量
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
SetShareCount
()
{
JObject
parm
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
Mall.WebApi/Controllers/MarketingCenter/StatisticsController.cs
View file @
4b1b0734
...
...
@@ -11,6 +11,7 @@ using Mall.Common.Plugin;
using
System.Collections.Generic
;
using
Mall.Module.User
;
using
Microsoft.AspNetCore.Authorization
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.MarketingCenter
{
...
...
@@ -352,7 +353,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
#
region
损益核算表
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetOrderProfitLossList
()
{
var
parms
=
RequestParm
;
...
...
@@ -381,7 +382,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
FileContentResult
GetOrderProfitLossExcel
()
{
var
parms
=
RequestParm
;
...
...
Mall.WebApi/Controllers/MarketingCenter/SurveyController.cs
View file @
4b1b0734
...
...
@@ -14,6 +14,7 @@ using Newtonsoft.Json.Linq;
using
Mall.Model.Entity.MarketingCenter
;
using
Mall.Common.Enum.MarketingCenter
;
using
Microsoft.AspNetCore.Authorization
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.MarketingCenter
{
...
...
@@ -305,7 +306,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
/// <param name="request"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetGuestSurveyDetails
()
{
var
parms
=
RequestParm
;
...
...
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
4b1b0734
...
...
@@ -19,6 +19,7 @@ using Mall.Model.Extend.Education;
using
Mall.Module.User
;
using
Microsoft.AspNetCore.Authorization
;
using
Mall.Model.Entity.Miai
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -44,7 +45,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetForumList
()
{
var
req
=
base
.
RequestParm
;
...
...
@@ -68,7 +69,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityPageList
()
{
var
parms
=
RequestParm
;
...
...
@@ -131,7 +132,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityInfo
()
{
var
userInfo
=
AppletUserInfo
;
...
...
@@ -333,7 +334,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetSimpleActivityPageList
()
{
var
parms
=
RequestParm
;
...
...
@@ -572,7 +573,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityDiscussPageList
()
{
var
parms
=
RequestParm
;
...
...
@@ -633,7 +634,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityDiscussCount
()
{
var
parms
=
RequestParm
;
...
...
@@ -668,7 +669,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetActivityReplyPageList
()
{
var
parms
=
RequestParm
;
...
...
@@ -1269,7 +1270,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
HttpPost
]
public
ApiResult
GetMiAiBaseIfo
()
{
...
...
@@ -1459,7 +1460,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// 获取会员基础信息
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
HttpPost
]
public
ApiResult
GetBaseInfoPageList
()
{
...
...
@@ -1551,7 +1552,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// 获取会员基础信息
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
HttpPost
]
public
ApiResult
GetBaseInfoQueryList
()
{
...
...
@@ -1645,7 +1646,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// 获取每日随机信息
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
HttpPost
]
public
ApiResult
GetDailyRandomList
()
{
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
4b1b0734
...
...
@@ -20,6 +20,7 @@ using Mall.Model.Entity.BaseSetUp;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Authorization
;
using
Mall.Common.Enum.Goods
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -786,7 +787,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
SetERPGoodsOrderInfo
()
{
var
req
=
RequestParm
;
...
...
@@ -879,7 +880,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
UpdateERPGoodsOrderInfo
()
{
var
req
=
RequestParm
;
...
...
Mall.WebApi/Controllers/Reserve/AppletStoresController.cs
View file @
4b1b0734
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Dnc.Api.Throttle
;
using
Mall.AOP
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
...
...
@@ -52,7 +53,7 @@ namespace Mall.WebApi.Controllers.Reserve
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
virtual
ApiResult
GetCurrentStore
(
object
requestMsg
)
{
var
userInfo
=
AppletUserInfo
;
...
...
@@ -114,7 +115,7 @@ namespace Mall.WebApi.Controllers.Reserve
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
virtual
ApiResult
GetStorePage
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -139,7 +140,7 @@ namespace Mall.WebApi.Controllers.Reserve
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
virtual
ApiResult
GetStoreInfo
(
object
requestMsg
)
{
var
userInfo
=
AppletUserInfo
;
...
...
@@ -227,7 +228,7 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetServicePersonalList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -261,7 +262,7 @@ namespace Mall.WebApi.Controllers.Reserve
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetServicePersonalDetailList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -299,7 +300,7 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetServicePersonalModel
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
@@ -959,7 +960,7 @@ namespace Mall.WebApi.Controllers.Reserve
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)
]
public
ApiResult
GetAppletGoodsCommentPageList
(
object
requestMsg
)
{
var
parms
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
...
...
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.CacheManager.User
;
using
Mall.Common
;
using
Mall.Common.API
;
...
...
@@ -945,7 +946,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 获取商会活动类型列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCommerceActivityTypeList
()
{
var
query
=
new
RB_Commerce_ActivityType_Extend
();
...
...
@@ -960,7 +961,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 获取商会活动分页列表
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCommerceActivityPage
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -981,7 +982,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// 获取商会活动详情
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCommerceActivity
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -1171,7 +1172,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetNatureEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
NatureEnum
));
...
...
@@ -1563,7 +1564,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetAuthenticationCategoryEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
AuthenticationCategoryEnum
));
...
...
@@ -1579,7 +1580,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetAuthenticationTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
AuthenticationTypeEnum
));
...
...
@@ -1595,7 +1596,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBrandTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
BrandTypeEnum
));
...
...
@@ -1611,7 +1612,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBusinessTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
BusinessTypeEnum
));
...
...
@@ -1631,7 +1632,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCarrierPageList
()
{
var
userInfo
=
AppletUserInfo
;
...
...
@@ -1717,7 +1718,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCarrierDetails
()
{
var
userInfo
=
AppletUserInfo
;
...
...
@@ -1866,7 +1867,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetCustomerTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
CustomerTypeEnum
));
...
...
@@ -1882,7 +1883,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetProjectTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
ProjectTypeEnum
));
...
...
@@ -1903,7 +1904,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBrandPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -1963,7 +1965,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBrandDetails
()
{
var
req
=
RequestParm
;
...
...
@@ -2033,7 +2035,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetBrandClassList
()
{
var
query
=
new
RB_BrandClass_Extend
...
...
@@ -2047,7 +2049,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
#
region
奖章
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetPrizePageList
()
{
...
...
@@ -2359,7 +2361,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetAppletFirstShopListPageList
()
{
var
req
=
base
.
RequestParm
;
...
...
@@ -2560,7 +2562,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetListTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
ListTypeEnum
));
...
...
Mall.WebApi/Controllers/TradePavilion/TradeController.cs
View file @
4b1b0734
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Dnc.Api.Throttle
;
using
Mall.CacheManager.User
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
...
...
@@ -88,7 +89,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetContractPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -177,7 +178,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetContract
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -1764,7 +1765,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetProjectTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
Common
.
Enum
.
TradePavilion
.
ProjectTypeEnum
));
...
...
@@ -1875,6 +1876,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
public
ApiResult
GetBrandPageList
()
{
ResultPageModel
pageModel
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -2695,7 +2697,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetFirstShopEnrollZipExport
()
{
var
req
=
base
.
RequestParm
;
...
...
@@ -2721,7 +2723,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetFirstShopEnrollZipExport_V3
()
{
var
req
=
base
.
RequestParm
;
...
...
@@ -2752,7 +2754,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetNewFirstShopEnrollZipExport
()
{
var
req
=
base
.
RequestParm
;
...
...
@@ -2778,7 +2780,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetFirstShopEnrollResultUrl
()
{
var
req
=
base
.
RequestParm
;
...
...
@@ -2805,7 +2807,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
DelFirstShopEnrollZipExport
()
{
var
req
=
base
.
RequestParm
;
...
...
Mall.WebApi/Controllers/User/AppletLoginController.cs
View file @
4b1b0734
...
...
@@ -22,6 +22,8 @@ using Mall.CacheKey;
using
Mall.Common.Pay.WeChatPat
;
using
Mall.Module.MarketingCenter
;
using
Mall.Module.Miai
;
using
Dnc.Api.Throttle
;
using
Microsoft.AspNetCore.Authorization
;
namespace
Mall.WebApi.Controllers.User
{
...
...
@@ -51,9 +53,17 @@ namespace Mall.WebApi.Controllers.User
/// <param name="requestMsg"></param>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
Login
(
object
requestMsg
)
{
var
requestParm
=
JsonConvert
.
DeserializeObject
<
RequestParm
>(
requestMsg
.
ToString
());
var
lObj
=
JObject
.
Parse
(
requestMsg
.
ToString
());
var
requestParm
=
new
RequestParm
()
{
TenantId
=
lObj
.
GetInt
(
"TenantId"
),
MallBaseId
=
lObj
.
GetInt
(
"MallBaseId"
),
msg
=
lObj
.
GetStringValue
(
"msg"
)
};
JObject
parms
=
JObject
.
Parse
(
requestParm
.
msg
.
ToString
());
// LogHelper.WriteInfo("登录请求数据:" + requestParm.msg.ToString());
RB_Member_User_Extend
demodel
=
new
RB_Member_User_Extend
()
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
4b1b0734
...
...
@@ -17,6 +17,7 @@ using Mall.Module.BaseSetUp;
using
Mall.Common
;
using
Mall.CacheManager.User
;
using
Microsoft.AspNetCore.Authorization
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.User
{
...
...
@@ -195,7 +196,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
ERPSetUserShippingAddress
()
{
var
req
=
RequestParm
;
...
...
Mall.WebApi/Controllers/User/MemberUserController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.Common.API
;
using
Mall.Model.Extend.User
;
using
Mall.Module.User
;
...
...
@@ -21,7 +22,7 @@ namespace Mall.WebApi.Controllers.User
public
class
MemberUserController
:
BaseController
{
private
MemberUserModule
MemberUserModule
=
new
MemberUserModule
();
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
/// <summary>
/// 用户登录
/// </summary>
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
4b1b0734
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.AOP
;
using
Mall.Common
;
using
Mall.Common.API
;
...
...
@@ -183,7 +184,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetSupplierAllList
()
{
var
parms
=
RequestParm
;
...
...
@@ -202,7 +203,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetAllSupplierList
()
{
var
parms
=
RequestParm
;
...
...
@@ -232,7 +233,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetDistributorInfoList
()
{
var
parms
=
RequestParm
;
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
4b1b0734
...
...
@@ -25,6 +25,7 @@ using Mall.Model.Query;
using
Mall.Model.Extend.AppletWeChat
;
using
Mall.AOP
;
using
Mall.Module.User
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.User
{
...
...
@@ -85,7 +86,7 @@ namespace Mall.WebApi.Controllers.User
private
readonly
Module
.
Property
.
AuthorizeModule
authorizeModule
=
new
Module
.
Property
.
AuthorizeModule
();
#
region
商户信息
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
/// <summary>
/// 用户登录
/// </summary>
...
...
@@ -231,7 +232,7 @@ namespace Mall.WebApi.Controllers.User
/// 用户注册第一步
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
SetTenantFirst
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Tenant_Extend
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -251,7 +252,7 @@ namespace Mall.WebApi.Controllers.User
/// 用户注册第二步
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
SetTenantSecond
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Tenant_Extend
>(
RequestParm
.
msg
.
ToString
());
...
...
@@ -284,7 +285,7 @@ namespace Mall.WebApi.Controllers.User
/// 修改密码账号
/// </summary>
/// <returns></returns>
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
UpdateTenantPwd
()
{
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Tenant_Extend
>(
RequestParm
.
msg
.
ToString
());
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
4b1b0734
...
...
@@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Http;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Configuration.Json
;
using
Google.Protobuf.WellKnownTypes
;
using
Dnc.Api.Throttle
;
namespace
Mall.WebApi.Controllers.User
{
...
...
@@ -3479,7 +3480,7 @@ namespace Mall.WebApi.Controllers.User
#
region
获取用户列表
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetMemberUserListExt
()
{
var
re
=
RequestParm
;
...
...
@@ -3506,7 +3507,7 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetShippingAddressList
()
{
var
req
=
RequestParm
;
...
...
Mall.WebApi/Mall.WebApi.csproj
View file @
4b1b0734
...
...
@@ -19,6 +19,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Dnc.Api.Throttle" Version="1.2.1" />
<PackageReference Include="DotNetCore.CAP" Version="2.6.0" />
<PackageReference Include="DotNetCore.CAP.MongoDB" Version="2.6.0" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" Version="2.6.0" />
...
...
Mall.WebApi/Startup.cs
View file @
4b1b0734
...
...
@@ -5,6 +5,7 @@ using System.Linq;
using
System.Text.Encodings.Web
;
using
System.Text.Unicode
;
using
System.Threading.Tasks
;
using
Dnc.Api.Throttle
;
using
Mall.ThirdCore.Message
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Builder
;
...
...
@@ -95,9 +96,44 @@ namespace Mall.WebApi
// //设置成功信息的删除时间默认24*3600秒
// x.SucceedMessageExpiredAfter = 3600;
//});
//Api限流
services
.
AddApiThrottle
(
options
=>
{
//配置redis
//如果Cache和Storage使用同一个redis,则可以按如下配置
options
.
UseRedisCacheAndStorage
(
opts
=>
{
opts
.
ConnectionString
=
"47.96.23.199,password=Viitto2018,connectTimeout=5000,allowAdmin=false,defaultDatabase=0"
;
opts
.
KeyPrefix
=
"apithrottle"
;
//指定给所有key加上前缀,默认为apithrottle
});
});
//这里添加ApiThrottleActionFilter拦截器
services
.
AddMvc
(
opts
=>
{
opts
.
Filters
.
Add
(
typeof
(
ApiThrottleActionFilter
));
}).
SetCompatibilityVersion
(
CompatibilityVersion
.
Version_3_0
);
services
.
AddApiThrottle
(
options
=>
{
options
.
Global
.
AddValves
(
new
BlackListValve
{
Policy
=
Policy
.
Ip
,
Priority
=
99
},
new
WhiteListValve
{
Policy
=
Policy
.
UserIdentity
,
Priority
=
88
},
new
BlackListValve
{
Policy
=
Policy
.
Header
,
PolicyKey
=
"throttle"
,
});
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public
void
Configure
(
IApplicationBuilder
app
,
IWebHostEnvironment
env
,
IHostApplicationLifetime
appLifetime
,
IOptions
<
SenparcSetting
>
senparcSetting
,
IOptions
<
SenparcWeixinSetting
>
senparcWeixinSetting
)
{
...
...
@@ -106,6 +142,7 @@ namespace Mall.WebApi
app
.
UseDeveloperExceptionPage
();
}
app
.
UseApiThrottle
();
app
.
UseHttpsRedirection
();
app
.
UseRouting
();
...
...
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