This commit is contained in:
zpc 2025-08-23 22:11:42 +08:00
parent eed11e9e64
commit 41fb0cf77b
2 changed files with 18 additions and 3 deletions

View File

@ -14,7 +14,7 @@
// "IsAutoCloseConnection": true
//}
{
"Conn": "Data Source=49.233.115.141;User ID=sa;Password=Dbt@com@123;Initial Catalog=OdtAdmin;Encrypt=True;TrustServerCertificate=True;",
"Conn": "Data Source=192.168.195.8;User ID=sa;Password=Dbt@com@123;Initial Catalog=OdtAdmin;Encrypt=True;TrustServerCertificate=True;",
"DbType": 1, // MySql = 0, SqlServer = 1, Oracle = 3PgSql = 4
"ConfigId": "0", //
"IsAutoCloseConnection": true
@ -97,7 +97,7 @@
],
//redis
"RedisServer": {
"open": 1, //redis
"open": 0, //redis
"dbCache": false, //使Redisopen1
"Cache": "192.168.1.41:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=cache:",
"Session": "192.168.1.41:6379,defaultDatabase=0,poolsize=50,ssl=false,writeBuffer=10240,prefix=session:"

View File

@ -1,7 +1,9 @@
using Infrastructure;
using Infrastructure.Model;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
using ZR.Model.System.Dto;
using ZR.ServiceCore.Services;
@ -96,7 +98,20 @@ namespace ZR.ServiceCore.Middleware
ContentType = "application/json",
Value = JsonConvert.SerializeObject(apiResult)
};
context.HttpContext.Response.StatusCode = 403;
if (Permission.Contains("odfports:"))
{
result = new(apiResult)
{
StatusCode = 200,
ContentType = "application/json",
Value = JsonConvert.SerializeObject(apiResult)
};
context.HttpContext.Response.StatusCode = 200;
}
else
{
context.HttpContext.Response.StatusCode = 403;
}
context.Result = result;
}
}