租户授权mysql链接报错处理

dev
cjy 2 months ago
parent 241bd4b9d3
commit e697d01d30

@ -19,7 +19,7 @@
"DBInfo": { "DBInfo": {
"DefaultDbConnId": "1288018625843826688", "DefaultDbConnId": "1288018625843826688",
"DefaultDbType": 0, "DefaultDbType": 0,
"DefaultDbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_dev", "DefaultDbString": "server=rm-m5e06xxqpa68a68ry5o.mysql.rds.aliyuncs.com;port=3306;uid=rulesengine_admin;pwd=Rule1qaz2wsx!QAZ;database=shippingweb8_dev;pooling=false",
"DBS": [ "DBS": [
{ {
"ConnId": "1288018625843826680", "ConnId": "1288018625843826680",

@ -29,7 +29,7 @@ public class TenantService : ITenantService
public TenantService(IServiceProvider serviceProvider) public TenantService(IServiceProvider serviceProvider)
{ {
_serviceProvider = serviceProvider; _serviceProvider = serviceProvider;
db = _serviceProvider.GetRequiredService<ISqlSugarClient>(); db = _serviceProvider.GetRequiredService<ISqlSugarClient>().CopyNew();
saasService = _serviceProvider.GetRequiredService<ISaasDbService>(); saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
} }
@ -187,7 +187,7 @@ public class TenantService : ITenantService
catch (Exception ex) catch (Exception ex)
{ {
db.Ado.RollbackTran(); db.Ado.RollbackTran();
ex.LogAsync(db).GetAwaiter().GetResult(); //ex.LogAsync(db).GetAwaiter().GetResult();
return DataResult.Failed("租户权限模块授权失败!" + ex, MultiLanguageConst.DataUpdateFailed); return DataResult.Failed("租户权限模块授权失败!" + ex, MultiLanguageConst.DataUpdateFailed);
} }
} }

Loading…
Cancel
Save