222
schangxiang@126.com
2025-08-25 533c702ee6602a45a7090324e66f4c8e892af6c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using iWareCommon.Common.Dao;
using iWareDataCore.ORM;
using iWareDataCore.RBAC.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace iWareDataCore.RBAC.Dao
{
   public class RoleUserDao : CommonDao<RoleUserEntity, RBACRoleUser>
    {
        private static object Lock = new object();
 
        private RoleUserDao() { }
 
        private static RoleUserDao Instance = null;
 
        /// <summary>
        /// 获取单例的方法
        /// </summary>
        /// <returns>角色-用户服务的单例实体</returns>
        public static RoleUserDao GetInstance()
        {
            if (Instance == null)
            {
                lock (Lock)
                {
                    if (Instance == null)
                    {
                        Instance = new RoleUserDao();
                    }
                }
            }
            return Instance;
        }
 
 
 
        protected override string GetColumnName(string name)
        {
            return RoleUserEntity.GetColumnName(name);
        }
 
        protected override string GetTableName()
        {
            return RoleUserEntity.GetTableName();
        }
 
        protected override RoleUserEntity ToEntity(RBACRoleUser s)
        {
            return new RoleUserEntity(s);
        }
 
        protected override RBACRoleUser ToOrm(RoleUserEntity t)
        {
            return t.ToOrm();
        }
 
        protected override List<string> GetColumnNames()
        {
            return RoleUserEntity.GetColumnMap().Keys.ToList();
        }
    }
}