正在显示
1 个修改的文件
包含
9 行增加
和
0 行删除
@@ -32,6 +32,7 @@ type adminDetailParam struct { | @@ -32,6 +32,7 @@ type adminDetailParam struct { | ||
32 | PermissionType []int `json:"permissionType"` | 32 | PermissionType []int `json:"permissionType"` |
33 | Status int `json:"status"` | 33 | Status int `json:"status"` |
34 | Account string `json:"account"` | 34 | Account string `json:"account"` |
35 | + IsAdmin int `json:"isAdmin"` | ||
35 | } | 36 | } |
36 | 37 | ||
37 | func (c *AdminUserController) SaveAdminUser() { | 38 | func (c *AdminUserController) SaveAdminUser() { |
@@ -91,6 +92,7 @@ func (c *AdminUserController) GetAdminUser() { | @@ -91,6 +92,7 @@ func (c *AdminUserController) GetAdminUser() { | ||
91 | Id: adminuser.Id, | 92 | Id: adminuser.Id, |
92 | Account: adminuser.Account, | 93 | Account: adminuser.Account, |
93 | Status: 0, | 94 | Status: 0, |
95 | + IsAdmin: 0, | ||
94 | } | 96 | } |
95 | for _, v := range adminuser.Permission { | 97 | for _, v := range adminuser.Permission { |
96 | rspData.PermissionType = append(rspData.PermissionType, v.Id) | 98 | rspData.PermissionType = append(rspData.PermissionType, v.Id) |
@@ -98,6 +100,9 @@ func (c *AdminUserController) GetAdminUser() { | @@ -98,6 +100,9 @@ func (c *AdminUserController) GetAdminUser() { | ||
98 | if adminuser.IsUsable { | 100 | if adminuser.IsUsable { |
99 | rspData.Status = 1 | 101 | rspData.Status = 1 |
100 | } | 102 | } |
103 | + if adminuser.IsDefault { | ||
104 | + rspData.IsAdmin = 1 | ||
105 | + } | ||
101 | c.ResponseData(rspData) | 106 | c.ResponseData(rspData) |
102 | return | 107 | return |
103 | } | 108 | } |
@@ -162,10 +167,14 @@ func (c *AdminUserController) ListAdminUser() { | @@ -162,10 +167,14 @@ func (c *AdminUserController) ListAdminUser() { | ||
162 | "account": adminusers[i].Account, | 167 | "account": adminusers[i].Account, |
163 | "permission": permissionTypes, | 168 | "permission": permissionTypes, |
164 | "statue": 0, | 169 | "statue": 0, |
170 | + "isAdmin": 0, | ||
165 | } | 171 | } |
166 | if adminusers[i].IsUsable { | 172 | if adminusers[i].IsUsable { |
167 | m["statue"] = 1 | 173 | m["statue"] = 1 |
168 | } | 174 | } |
175 | + if adminusers[i].IsDefault { | ||
176 | + m["statue"] = 1 | ||
177 | + } | ||
169 | listData = append(listData, m) | 178 | listData = append(listData, m) |
170 | } | 179 | } |
171 | c.ResponsePageList(listData, cnt, param.PageNumber) | 180 | c.ResponsePageList(listData, cnt, param.PageNumber) |
-
请 注册 或 登录 后发表评论