333
This commit is contained in:
parent
eed11e9e64
commit
41fb0cf77b
|
|
@ -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 = 3,PgSql = 4
|
||||
"ConfigId": "0", //多租户唯一标识
|
||||
"IsAutoCloseConnection": true
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
],
|
||||
//redis服务配置
|
||||
"RedisServer": {
|
||||
"open": 1, //是否启用redis
|
||||
"open": 0, //是否启用redis
|
||||
"dbCache": false, //数据库是否使用Redis缓存,如果启用open要为1
|
||||
"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:"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user