分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-05-23 24490a8b8f992ad0d3c531c08455842ff8aef93c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using WIDESEA_Core.Enums;
using System;
 
namespace WIDESEA_Core.Extensions
{
    public static class CacheKeyExtensions
    {
        public static string GetKey(this CPrefix prefix, object value)
        {
            return prefix.ToString() + value;
        }
 
        public static string GetUserIdKey(this int userId)
        {
            return CPrefix.UID.ToString() + userId;
        }
 
        public static string GetRoleIdKey(this int roleId)
        {
            return CPrefix.Role.ToString() + roleId;
        }
    }
}