增加文档管理功能

This commit is contained in:
2026-09-10 00:44:15 +08:00
parent 63bf972c17
commit 8a0334a020
18 changed files with 5958 additions and 4 deletions
+9
View File
@@ -32,6 +32,7 @@ type tenantUserPayload struct {
Password *string `json:"password"`
IsDefault *int8 `json:"is_default"`
Status *int8 `json:"status"`
OrgID *uint64 `json:"org_id"`
Remark *string `json:"remark"`
}
@@ -200,6 +201,11 @@ func (c *PlatformTenantUserController) CreateTenantUser() {
_ = c.ServeJSON()
return
}
if p.OrgID != nil && *p.OrgID > 0 {
_, _ = models.Orm.QueryTable(new(models.SystemTenantUser)).
Filter("id", id).
Update(map[string]interface{}{"org_id": *p.OrgID})
}
if isDefault == 1 {
_ = services.SetDefaultTenant(p.Uid, p.Tid)
// 租户第一个账号(普通租户)即租户管理员:自动绑定「租户管理员」角色,
@@ -265,6 +271,9 @@ func (c *PlatformTenantUserController) EditTenantUser() {
if p.Status != nil {
update["status"] = *p.Status
}
if p.OrgID != nil {
update["org_id"] = *p.OrgID
}
if p.Remark != nil {
update["remark"] = p.Remark
}