feat: 业务组和应用支持多负责人,修复权限查询表名错误

- 业务组 MasterUid 改为 MasterUids(逗号分隔多用户ID)
- 应用 OwnerId 改为 OwnerIds(逗号分隔多用户ID)
- 前端负责人下拉框改为多选
- 权限查询改用 FIND_IN_SET 匹配多负责人
- 修复 user_permissions 表名错误(应为 user_permission)
- 所有数据库实体添加 TableName() 方法显式指定表名
- xorm tag 显式指定 owner_ids/master_uids 列名
- 启动时自动清理 owner_ids 中的空格
This commit is contained in:
2026-05-15 21:09:40 +08:00
parent 5e55d899c3
commit 0b2e836c27
12 changed files with 193 additions and 81 deletions
+8
View File
@@ -22,6 +22,10 @@ type AppConfig struct {
ClientCount int `xorm:"-" json:"clientCount,omitempty"`
}
func (AppConfig) TableName() string {
return "app_config"
}
type AppConfigHistory struct {
Id int `xorm:"int autoincr pk" json:"id"`
OriginId int `xorm:"int" json:"originId"`
@@ -37,3 +41,7 @@ type AppConfigHistory struct {
CreatedAt *time.Time `xorm:"datetime" json:"createdAt"`
CreatedBy string `xorm:"varchar(32)" json:"createdBy"`
}
func (AppConfigHistory) TableName() string {
return "app_config_history"
}