Commit 70b76a10 authored by 吴春's avatar 吴春
parents 41707d5d f67e2177
......@@ -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")
{
......
......@@ -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
{
......
......@@ -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"
});
}
}
}
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment