Repository navigation
分域功能的解耦化
#414
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
当前分域功能的设计:
(1)在每个资源表,增加字段 user_group_id,用来表示用户组
(2)创建资源时,赋值给 user_group_id。
(3)查找资源时,在查找的 sql 语句增加 where 条件。即 'where user_group_id = xxx'
存在问题:不解耦
解耦设计:
(1)增加单独的资源组表:
存在问题:
(1)在列表分页查询时,采用资源和资源组分开的方式,使用sql的话,得连表查询。效率低、且很难实现。
All reactions