using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using System.Threading.Tasks; using ChessGameDomain; using CommonDomain; using RedisService.Param; using UserDomain.Entity; namespace RedisService { public interface IRedisService { RedisUserCid GetRedisUserCId(string userId); void SetRedisUserCId(RedisUserCid redisUser); void RemoveRedisUserCId(string userId); string GetLoginUserId(string cid); void SetLoginUserId(string cid, string userId); void RemoveLoginUserId(string cid); IEnumerable GetAllLoginUserIds(); string GetUserId(string cid); void SetUserId(string cid, string userId); void RemoveUserId(string cid); void SetVerificationCode(string phone, string code); string GetVerificationCode(string phone); void RemoveVerificationCode(string phone); void SetGameConfig(GameConfig gameConfig); GameConfig GetGameConfig(); void RemoveGameConfig(); void SetActivityConfig(ActivityConfig config); ActivityConfig GetActivityConfig(); void RemoveActivityConfig(); void SetFishingKillConfig(FishingKillConfig config); FishingKillConfig GetFishingKillConfig(); void SetFishSpawnConfig(string json); string GetFishSpawnConfig(); void SetGameRoom(RedisGameRoom gameRoom); RedisGameRoom GetGameRoom(string roomId); IEnumerable GetGameRoomList(string partition); IEnumerable GetGameRoomAllList(); void RemoveGameRoom(string partition); void RemoveGameRoomAll(); void SetChessRoom(ChessGameRoom room); ChessGameRoom GetChessRoom(string roomId); List GetAllChessRooms(); List GetAllPlayingChessRooms(); string GetPendingFishRoomId(string userId); string GetPendingChessRoomId(string userId); void RemoveChessRoom(string roomId); void ClearAllChessRooms(); void ClearAllGameRooms(); void ClearAllUserMappings(); void ClearAllLoginUserIds(); void SetSystemGoldDay(long amount); void AddSystemGoldDay(long gold); long GetSystemGoldDay(); long IncrBy(string key, long value); string GetString(string key); void SetString(string key, string value); long GetPlayerGold(string roomId, string userId); void SetPlayerGold(string roomId, string userId, long gold); bool AddBulletId(string roomId, string userId, string bulletId); bool ExistsBulletId(string roomId, string userId, string bulletId); bool RemoveBulletId(string roomId, string userId, string bulletId); long GetBulletCount(string roomId, string userId); void ClearBulletIds(string roomId, string userId); void ClearPlayerRuntimeData(string roomId, string userId); void AddFishingTaskProgress(string roomId, string userId, int taskEvent, long count); Dictionary GetFishingTaskProgress(string roomId, string userId, IEnumerable taskEvents); void ClearFishingTaskProgress(string roomId, string userId, IEnumerable taskEvents); void AddFishingConsumeProgress(string roomId, string userId, long count); long GetFishingConsumeProgress(string roomId, string userId); void AddFishingExpProgress(string roomId, string userId, long count); long GetFishingExpProgress(string roomId, string userId); void ClearFishingRuntimeProgress(string roomId, string userId); PlayerFactor GetPlayerFactor(string roomId, string userId); void SetPlayerFactor(string roomId, string userId, PlayerFactor factor); void RemovePlayerFactor(string roomId, string userId); List GetKillFishIds(string roomId); void AddKillFishId(string roomId, string fishId); bool ContainsKillFishId(string roomId, string fishId); } }