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
70b76a10
Commit
70b76a10
authored
Dec 23, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
41707d5d
f67e2177
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
26 deletions
+21
-26
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+0
-2
ApiFilterAttribute.cs
Mall.WebApi/Filter/ApiFilterAttribute.cs
+14
-15
Startup.cs
Mall.WebApi/Startup.cs
+6
-6
TimerJobj.cs
Mall.WebApi/Timers/TimerJobj.cs
+1
-3
No files found.
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
70b76a10
...
...
@@ -1557,7 +1557,6 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
configModel
.
Type
==
1
)
{
string
alimsg
=
orderModule
.
GetOrderExpressInfoForAliyun
(
ExpressNumber
,
model
.
ExpressCode
,
configModel
.
AppCode
,
configModel
.
RquUrl
);
LogHelper
.
Write
(
alimsg
);
JObject
Rparms
=
JObject
.
Parse
(
alimsg
);
if
(
Rparms
.
GetStringValue
(
"Success"
).
ToLower
()
==
"true"
)
{
...
...
@@ -1576,7 +1575,6 @@ namespace Mall.WebApi.Controllers.MallBase
else
if
(
configModel
.
Type
==
2
)
{
var
jsonStr
=
orderModule
.
GetOrderExpressInfo
(
model
.
ExpressCode
,
ExpressNumber
,
configModel
.
AppID
,
configModel
.
AppKey
,
configModel
.
RquUrl
);
LogHelper
.
Write
(
jsonStr
);
JObject
Rparms
=
JObject
.
Parse
(
jsonStr
);
if
(
Rparms
.
GetStringValue
(
"Success"
).
ToLower
()
==
"true"
)
{
...
...
Mall.WebApi/Filter/ApiFilterAttribute.cs
View file @
70b76a10
...
...
@@ -89,26 +89,25 @@ namespace Mall.WebApi.Filter
string
controllerName
=
actionContext
.
ActionDescriptor
.
RouteValues
[
"controller"
].
ToString
().
ToLower
();
string
actionName
=
actionContext
.
ActionDescriptor
.
RouteValues
[
"action"
].
ToString
().
ToLower
();
//string areaName = actionContext.ActionDescriptor.RouteValues["area"].ToString().ToLower();
if
(!
actionName
.
ToLower
().
Contains
(
"get"
))
{
string
cachedKey
=
SecurityHelper
.
MD5
(
string
.
Format
(
"cmd={0}&token={1}"
,
controllerName
+
"/"
+
actionName
,
token
));
try
{
//
if (UserReidsCache.Exists(cachedKey))//判断表单是否重复提交
//
{
//
actionContext.Result = new Microsoft.AspNetCore.Mvc.JsonResult(new ApiResult
//
{
//
resultCode = (int)ResultCode.FormRepeatSubmit,
//
message = "表单重复提交,请稍后再试",
//
data = null
//
});
//
}
//
else
//
{
// //默认2
秒钟之内不能重复提交
// UserReidsCache.Set(cachedKey, 1, 2
);
//
}
if
(
UserReidsCache
.
Exists
(
cachedKey
))
//判断表单是否重复提交
{
actionContext
.
Result
=
new
Microsoft
.
AspNetCore
.
Mvc
.
JsonResult
(
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
FormRepeatSubmit
,
message
=
"表单重复提交,请稍后再试"
,
data
=
null
});
}
else
{
//默认3
秒钟之内不能重复提交
UserReidsCache
.
Set
(
cachedKey
,
1
,
3
);
}
}
catch
{
...
...
Mall.WebApi/Startup.cs
View file @
70b76a10
...
...
@@ -129,12 +129,12 @@ namespace Mall.WebApi
{
Timers
.
TimerJobj
.
RunStop
();
//网站停止完成执行
});
//
app.UseStaticFiles(new StaticFileOptions
//
{
//
FileProvider = new Microsoft.Extensions.FileProviders.PhysicalFileProvider(
//
Path.Combine(Directory.GetCurrentDirectory(), "upfile")),
//
RequestPath = "/upfile"
//
});
app
.
UseStaticFiles
(
new
StaticFileOptions
{
FileProvider
=
new
Microsoft
.
Extensions
.
FileProviders
.
PhysicalFileProvider
(
Path
.
Combine
(
Directory
.
GetCurrentDirectory
(),
"upfile"
)),
RequestPath
=
"/upfile"
});
}
}
}
Mall.WebApi/Timers/TimerJobj.cs
View file @
70b76a10
...
...
@@ -15,15 +15,13 @@ namespace Mall.WebApi.Timers
public
static
void
RunTimer
()
{
LogHelper
.
Write
(
"进来了 。。。 定时器启动"
);
timer1
=
new
System
.
Timers
.
Timer
();
timer1
.
Interval
=
1000
*
(
60
*
60
);
//60分钟
timer1
.
Interval
=
1000
*
(
60
*
60
)
*
3
;
//60分钟
timer1
.
Elapsed
+=
new
System
.
Timers
.
ElapsedEventHandler
(
ClearFile
);
timer1
.
Enabled
=
true
;
}
public
static
void
RunStop
()
{
LogHelper
.
Write
(
"定时器停止运行......"
);
timer1
.
Enabled
=
false
;
}
...
...
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