hash형태 수정및 다음 작업 메모 추가

This commit is contained in:
김민서 2024-04-03 16:01:01 +09:00
parent cc08ad8126
commit d2e5617198
2 changed files with 15 additions and 2 deletions

View File

@ -16,7 +16,9 @@ namespace Server.Service
public override string Process()
{
//string uniqueSessionId = Guid.NewGuid().ToString(); 이러한 형태를 사용해 key값을 저장
//서버에서 데이터를 받아 user의 데이터들을 redis에 저장
//이러한 형태로 세션을 관리.
User user;
bool newUser = false;
#region

View File

@ -193,7 +193,7 @@ namespace Server.System
SetHash(item.Key, item.Value, keys);
}
public Dictionary<string, object> GetHash(params string[] keys)
public Dictionary<string, object> GetAllHash(params string[] keys)
{
Dictionary<string, object> hash = new Dictionary<string, object>();
if (local)
@ -211,6 +211,17 @@ namespace Server.System
return hash;
}
public object GetHash(string field ,params string[] keys)
{
if (local)
{
Dictionary<string, string> hashs = new Dictionary<string, string>(hashType[KeySet(keys)]);
return hashs[field];
}
else
return db.HashGet(KeySet(keys), field);
}
private string KeySet(string[] keys)
{
return string.Join(":", keys);