增加文档管理功能
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user