diff --git a/MagMan.Core/Services/MessageService.cs b/MagMan.Core/Services/MessageService.cs index 8ce9bbc..dc81144 100644 --- a/MagMan.Core/Services/MessageService.cs +++ b/MagMan.Core/Services/MessageService.cs @@ -173,7 +173,7 @@ namespace MagMan.Core.Services /// public async Task CustomerIdByToken(string RestToken) { - string currKey = $"{Const.rKeyConfig}:Dict:Token2CustID"; + string currKey = $"{Const.rKeyConfig}:Mserv:Dict:Token2CustID"; int answ = await RedisHashGetInt(currKey, RestToken); return answ; } @@ -186,7 +186,7 @@ namespace MagMan.Core.Services /// public bool CustomerIdByTokenSet(string RestToken, int CustId) { - string currKey = $"{Const.rKeyConfig}:Dict:Token2CustID"; + string currKey = $"{Const.rKeyConfig}:Mserv:Dict:Token2CustID"; bool fatto = RedisHashSet(currKey, RestToken, $"{CustId}"); return fatto; } @@ -198,7 +198,7 @@ namespace MagMan.Core.Services /// public async Task MainKeyByCustomer(int CustID) { - string currKey = $"{Const.rKeyConfig}:Dict:Cust2MKey"; + string currKey = $"{Const.rKeyConfig}:Mserv:Dict:Cust2MKey"; int answ = await RedisHashGetInt(currKey, $"{CustID}"); return answ; } @@ -211,7 +211,7 @@ namespace MagMan.Core.Services /// public bool MainKeyByCustomerSet(int CustId, int MainKey) { - string currKey = $"{Const.rKeyConfig}:Dict:Cust2MKey"; + string currKey = $"{Const.rKeyConfig}:Mserv:Dict:Cust2MKey"; bool fatto = RedisHashSet(currKey, $"{CustId}", $"{MainKey}"); return fatto; } @@ -223,7 +223,7 @@ namespace MagMan.Core.Services /// public async Task MainKeyByToken(string RestToken) { - string currKey = $"{Const.rKeyConfig}:Dict:Token2MKey"; + string currKey = $"{Const.rKeyConfig}:Mserv:Dict:Token2MKey"; int answ = await RedisHashGetInt(currKey, RestToken); return answ; } @@ -236,7 +236,7 @@ namespace MagMan.Core.Services /// public bool MainKeyByTokenSet(string RestToken, int CustId) { - string currKey = $"{Const.rKeyConfig}:Dict:Token2MKey"; + string currKey = $"{Const.rKeyConfig}:Mserv:Dict:Token2MKey"; bool fatto = RedisHashSet(currKey, RestToken, $"{CustId}"); return fatto; } @@ -318,7 +318,7 @@ namespace MagMan.Core.Services public bool ResetHashDict() { bool fatto = false; - string baseKey = $"{Const.rKeyConfig}:Dict"; + string baseKey = $"{Const.rKeyConfig}:Mserv:Dict"; try { // salvo! diff --git a/MagMan.Data.Admin/Services/MTAdminService.cs b/MagMan.Data.Admin/Services/MTAdminService.cs index 02be44f..6e9118e 100644 --- a/MagMan.Data.Admin/Services/MTAdminService.cs +++ b/MagMan.Data.Admin/Services/MTAdminService.cs @@ -61,7 +61,7 @@ namespace MagMan.Data.Admin.Services List? dbResult = new List(); try { - string currKey = $"{Const.rKeyConfig}:AuthKeyList:{CustomerId}"; + string currKey = $"{Const.rKeyConfig}:Admin:AuthKeyList:{CustomerId}"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey); @@ -195,7 +195,7 @@ namespace MagMan.Data.Admin.Services List? dbResult = new List(); try { - string currKey = $"{Const.rKeyConfig}:CustomersList"; + string currKey = $"{Const.rKeyConfig}:Admin:CustomersList"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey); @@ -241,7 +241,7 @@ namespace MagMan.Data.Admin.Services public async Task CustomerIdByToken(string RestToken) { int answ = -1; - string currKey = $"{Const.rKeyConfig}:Dict:Token2CustID"; + string currKey = $"{Const.rKeyConfig}:Admin:Dict:Token2CustID"; answ = RedisHashGetInt(currKey, RestToken); if (answ <= 0) { @@ -332,7 +332,7 @@ namespace MagMan.Data.Admin.Services List? dbResult = new List(); try { - string currKey = $"{Const.rKeyConfig}:MachineList:{CustomerId}"; + string currKey = $"{Const.rKeyConfig}:Admin:MachineList:{CustomerId}"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey); @@ -424,7 +424,7 @@ namespace MagMan.Data.Admin.Services public async Task MainKeyByCustomer(int CustID) { int answ = -1; - string currKey = $"{Const.rKeyConfig}:Dict:Cust2MKey"; + string currKey = $"{Const.rKeyConfig}:Admin:Dict:Cust2MKey"; answ = RedisHashGetInt(currKey, $"{CustID}"); if (answ <= 0) { @@ -450,7 +450,7 @@ namespace MagMan.Data.Admin.Services public async Task MainKeyByToken(string RestToken) { int answ = -1; - string currKey = $"{Const.rKeyConfig}:Dict:Token2MKey"; + string currKey = $"{Const.rKeyConfig}:Admin:Dict:Token2MKey"; answ = RedisHashGetInt(currKey, RestToken); if (answ <= 0) { diff --git a/MagMan.Data.Tenant/Services/TenantService.cs b/MagMan.Data.Tenant/Services/TenantService.cs index dba06d1..e118046 100644 --- a/MagMan.Data.Tenant/Services/TenantService.cs +++ b/MagMan.Data.Tenant/Services/TenantService.cs @@ -116,7 +116,7 @@ namespace MagMan.Data.Tenant.Services List? dbResult = new List(); try { - string currKey = $"{Const.rKeyConfig}:ItemList:{nKey}"; + string currKey = $"{Const.rKeyConfig}:{nKey}:ItemListAll"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey); @@ -296,7 +296,7 @@ namespace MagMan.Data.Tenant.Services try { string dType = withChild ? "MaterialsDtoFull" : "MaterialsDto"; - string currKey = $"{Const.rKeyConfig}:{dType}:{nKey}"; + string currKey = $"{Const.rKeyConfig}:{nKey}:{dType}"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey); @@ -435,8 +435,8 @@ namespace MagMan.Data.Tenant.Services List? dbResult = new List(); try { - string dType = withChild ? "MaterialsFull" : "Materials"; - string currKey = $"{Const.rKeyConfig}:{dType}:{nKey}"; + string dType = withChild ? "MaterModAllFull" : "MaterModAll"; + string currKey = $"{Const.rKeyConfig}:{nKey}:{dType}"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey); @@ -494,7 +494,7 @@ namespace MagMan.Data.Tenant.Services List? dbResult = new List(); try { - string dType = withChild ? "MatInvFull" : "MatInv"; + string dType = withChild ? "MaterModFiltAll" : "MaterModFilt"; string currKey = $"{Const.rKeyConfig}:{nKey}:{dType}:{matID}"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); @@ -709,7 +709,7 @@ namespace MagMan.Data.Tenant.Services List? dbResult = new List(); try { - string currKey = $"{Const.rKeyConfig}:ProjList:{nKey}"; + string currKey = $"{Const.rKeyConfig}:{nKey}:ProjListAll"; Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string? rawData = await redisDb.StringGetAsync(currKey);